高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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
|