代码
//隐藏打开图形数据库db
db = CAD.CADMgr.CADEntity.Getdb(
ConfigInfo.productPath + file.Path,
System.IO.FileShare.ReadWrite, false);
if (Application.DocumentManager.Count == 0)
{
Application.DocumentManager.Add("acadiso.dwt");
}
Document doc = Application.DocumentManager.MdiActiveDocument;
DocumentLock lockDoc = doc.LockDocument();
using (lockDoc)
{
//处理db中的块等实体
}
db = CAD.CADMgr.CADEntity.Getdb(
ConfigInfo.productPath + file.Path,
System.IO.FileShare.ReadWrite, false);
if (Application.DocumentManager.Count == 0)
{
Application.DocumentManager.Add("acadiso.dwt");
}
Document doc = Application.DocumentManager.MdiActiveDocument;
DocumentLock lockDoc = doc.LockDocument();
using (lockDoc)
{
//处理db中的块等实体
}