如何将块保存为单个文件?
(命令 “-wblock” newBlockFilePath blockName)我可以使用lisp将块保存为单个文件。
如何实现此使用 .net?
**** Hidden Message ***** 查看WBlockCloneObjects。
////将所有objectId克隆到新图形,并将其保存到路径& filename。。
。
Database newdata =新数据库(true,true);。
string sav Path = @ " C:\ Path \ "+DwgName;。
。
使用(Transaction ntrans = newdata,transaction manager . start transaction())。
{。
block table record new btr =(block table record)ntrans,GetObject(SymbolUtilityServices,GetBlockModelSpaceId(newdata),OpenMode。for read);。
。
id mapping id map = new id mapping();。
。
数据库,WblockCloneObjects(oidc,newbtr。ObjectId,IDMap,DuplicateRecordCloning。替换,假);。
。
新数据,另存为(SavPath,DwgVersion。当前);。
。
ntrans,commit();。
} 。
。
查看WBlockCloneObjects。
////将所有objectId克隆到新图形,并将其保存到路径& filename。。
。
Database newdata =新数据库(true,true);。
string sav Path = @ " C:\ Path \ "+DwgName;。
。
使用(Transaction ntrans = newdata,transaction manager . start transaction())。
{。
block table record new btr =(block table record)ntrans,GetObject(SymbolUtilityServices,GetBlockModelSpaceId(newdata),OpenMode。for read);。
。
id mapping id map = new id mapping();。
。
数据库,WblockCloneObjects(oidc,newbtr。ObjectId,IDMap,DuplicateRecordCloning。替换,假);。
。
新数据,另存为(SavPath,DwgVersion。当前);。
。
ntrans,commit();。
} 。
谢谢您!。
不客气!
页:
[1]