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

yang686526 2009-05-07 12:44 PM

【转帖】redefine block
 
redefine block
redefine block
what is the correct procedure to redefine an existing block ? do i have to
iterate that specific block record and make all entities to erase mode and then append my new set of entities?
it's also possible to erase existing blocktablerecord and add to block table a new one with the same name but your method is more safe. if insertions of this block exist in drawing using your method they will stay valid and reference the redefined block. else they will reference erased one. newly created block will have different id.
another way is using handoverto() function:
pexistingblock->handoverto(pnewblock);
this is safe too. redefined block will have the same id.
sergey slezkin
thanks for clarifying
permanently erase a record
quote:
originally posted by sergey slezkin
it's also possible to erase existing blocktablerecord and add to block table a new one with the same name
hi sergey,
i am trying to do following simple steps:
1. erase a blocktablerecord (with name = "block1").
2. rename an existing blocktablerecord to "block1".
but the "erased" record is still in database memory and hence it throws "duplicate record name" exception.
is there any way to permanently erase a record (other than opening/closing database or clearing my undo stack).
thx.


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