高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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
|