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

yang686526 2009-05-07 06:01 PM

【转帖】user Block
 
user block
user block
i have a database reactor added to my project and i think the following event gets called (for each entity in the user block) when i call undo
of the "user block" creation.
void cdbreactor:bjectunappended(const oddbdatabase* pdb,const oddbobject* pobject) //cdbreactor is derived from database reactor class
{}
inside the above event , i would like to know whether the pobject is an entity within a user defined block or not. how can i do that?
i am getting the ownerid of pobject and if pobject is an entity , i am opening the ownerid object from within the even handler . for this specific (undoing block creation) , when i try to do the same , i am getting the error "was open for undo"
try to open owner "for notify": openobject(oddb::kfornotify)
vladimir


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