几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】retrieve Active View Viewpor (http://www.dimcax.com/hust/showthread.php?t=18450)

yang686526 2009-05-07 03:08 PM

【转帖】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


所有的时间均为北京时间。 现在的时间是 10:57 PM.