leonn123 发表于 2003-11-2 20:01:00

谁有插入dwg文件的例子??

可以发给我吗??
leonn123@163.net

dolly 发表于 2003-11-3 11:20:00

// Make "first" the current database.
AcDbDatabase *pDbFirst = new AcDbDatabase(Adesk::kFalse);
pDbFirst->readDwgFile("first.dwg");
// Now make "second" be the current database.
AcDbDatabase *pDbSecond = new AcDbDatabase(Adesk::kFalse);
pDbSecond->readDwgFile("second.dwg");
// Insert "second" into "first" as ABLOCK.
Acad::ErrorStatus es;
AcDbObjectId blockId;
es = pDbFirst->insert(blockId, "ABLOCK", pDbSecond);
// Deleting "second" makes the current database NULL.
delete pDbSecond;
// Make the current database "first" again.
myHostServices->setWorkingDatabase(pDbFirst);

leonn123 发表于 2003-11-3 19:41:00

谢谢已搞定
页: [1]
查看完整版本: 谁有插入dwg文件的例子??