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

yang686526 2009-05-07 03:04 PM

【转帖】replacing A Blocktablerecord For A Dwg File
 
replacing a blocktablerecord for a dwg file
replacing a blocktablerecord for a dwg file
code:
oddbdatabase oddbdatabase, dbptr;
oddbdatabase = myservices.readfile(_t("c:\\destdb.dwg"));
dbptr = myservices.readfile(_t("c:\\testinsertblock.dwg"));
oddbdatabase->insert(_t("myblockname"), dbptr);
if we try to insert a new blocktablerecord with "mybtrname", it works fine.
but if we modify "testinsertblock.dwg" and reinsert it in "destdb.dwg" we have an exception: eodduplicaterecordname.
if we can't reinsert a blocktablerecord with the same name, how could we redefine it ?
in autocad, acdbdatabase::insert(acdbobjectid objid, const char* pblockname, acdbdatabase* pdb) redefine pblockname if the same name is in the block table.
thanks. we'll fix it after checking how it works in arx.
sergey slezkin


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