几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】deffenence between entity90 and objectid90.safeopenobject90 (http://www.dimcax.com/hust/showthread.php?t=15662)

yang686526 2009-05-04 07:18 PM

【转帖】deffenence between entity90 and objectid90.safeopenobject90
 
deffenence between entity() and objectid().safeopenobject()
deffenence between entity() and objectid().safeopenobject()
who can tell me the deffenence between oddbobjectiterator::entity() and oddbobjectiterator:: objectid().safeopenobject()
codes as follows
oddbdatabaseptr pdb = svcs.readfile();
oddbblocktableptr pblocktable = pdb->getblocktableid().safeopenobject();
oddbblocktablerecordptr pblock = pblocktable->getat("*model_space", oddb::kforread);
oddbobjectiteratorptr pentiter = pblock->newiterator();
for (; !pentiter->done(); pentiter->step())
{
oddbentityptr pent1 = pentiter->objectid().safeopenobject();
oddbentityptr pent2 = pentiter->entity();
}
thank you very much!
last edited by yeyunxiaopan; 22nd january 2008 at 12:23 amfff">.
safeopenobject() will throw exception if it cannot open object.
entity() will return null pointer.
vladimir


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