查看单个帖子
旧 2009-05-07, 03:08 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】retrieve Active View Viewpor

retrieve active view / viewport
retrieve active view / viewport
i cannot retrieve the last active view of a simple modelspace-only drawing. i've tried the obvious, such as modelspace->activeviewport, and iterating through the viewport table, view table, and viewport entities, but cannot find it. how do i do this?
hi,
you can use the oddbviewporttable::getactiveviewportid() function. it will return the id of the active model space viewport.
to get the active paperspace viewport you can use oddblayout::activeviewportid() (which probably may be used for getting the model space too but oddbviewporttable::getactiveviewportid() seems simpler)
best regards
chudomir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)