zoukankan      html  css  js  c++  java
  • 不打开文件操作db时,如果遇到和窗体交互,不会提示文档未锁,但同样需要锁定当前文档,代码如下

    代码
                       //隐藏打开图形数据库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中的块等实体
                        }
  • 相关阅读:
    spoj 104 Highways (最小生成树计数)
    bzoj 1912 巡逻(树直径)
    BZOJ 3534 重建
    BZOJ 3143 游走(高斯消元)
    在Windows下编译PyCaffe
    caffe的Matlab接口的使用方法
    NewRelic性能监控之APM
    MariaDB-10.x二进制包安装
    mongoDB-3.x Balancer Management
    mongoDB-3.x集群管理
  • 原文地址:https://www.cnblogs.com/houlinbo/p/1645137.html
Copyright © 2011-2022 走看看