Posts: 11
Registered: ‎10-25-2005
Message 1 of 1 (62 Views)

How can close AxDbDocumentClass Open

62 Views, 0 Replies
08-16-2006 06:03 PM
static public void DBX_InsertBlock(string fileName, string blockName,AcadModelSpace CurSpace)
AxDbDocumentClass dbx = new AxDbDocumentClass();
dbx.Open(fileName, "");
AcadBlock[] blk1 = new AcadBlock[1];
for (int i = 0; i < dbx.Blocks.Count; i++)
if (dbx.Blocks.Item(i).Name == blockName)
blk1[0] = (AcadBlock)dbx.Blocks.Item(i);
Object missing = Type.Missing;
dbx.CopyObjects(blk1, CurSpace, ref missing);
I Copy Block from other File,but how can i close dbx or dispose it ,because i want to open the fileName File to edit.
Thanks !!!
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.