几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】fastest way to getfind a entity (http://www.dimcax.com/hust/showthread.php?t=16291)

yang686526 2009-05-05 10:48 AM

【转帖】fastest way to getfind a entity
 
fastest way to get/find a entity
fastest way to get/find a entity
given that i have a entity handle what's the fastest way to find the entity in the dwg file. i guess i search modelspace and paperspace and then the block defs but what technique/trick is best ?.
if you have oddbhandle, then you can use:
oddbdatabase::_get_od_db_object_id() to convert to oddbobjectid.
then:
oddbentityptr pent = id.safeopenobject();
oddbblocktablerecordptr pblock = pent->blockid();
and now you can explore the block table record for the information you need.
hope this helps.
regards
chudomir


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