几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】given pdb, how is paper size found (http://www.dimcax.com/hust/showthread.php?t=16432)

yang686526 2009-05-05 11:37 AM

【转帖】given pdb, how is paper size found
 
given pdb, how is paper size found?
given pdb, how is paper size found?
i am guessing that
od?db?database::getpaperspaceid() is a good place to start, and
that i eventually want to get to an object that has
oddbplotsettings::getplotpapersize() available to it.
but how do i do that?
oddbobjectid pspace = pdb->getpaperspaceid();
oddbobjectptr ps = pspace.safeopenobject();
printf (ps->isa()->name() );
tells me that ps is a acdbblocktablerecord:
then i get lost in the maze of class hierarchies?
any pointers?
oddbobjectid idlayout = oddbblocktablerecordptr( ps )->getlayoutid();
oddblayoutptr playout = idlayout.safeopenobject( );
oddbplotsettings *pplotsettings = playout.get();
pplotsettings->getplotpapersize( w, h );
thanks a lot. i don't think i would ever have found that.
for eany future users, include "tables.h" to get all the definitions
you need here.


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