話不多說,直接代碼,整個過程不需要發起Transaction ...
話不多說,直接代碼,整個過程不需要發起Transaction
OpenOptions op = new OpenOptions(); op.Audit = true; //是否需要核查 op.DetachFromCentralOption = DetachFromCentralOption.DetachAndDiscardWorksets;//脫離並放棄工作集 var mp = ModelPathUtils.ConvertUserVisiblePathToModelPath(path); //path為rvt文件的物理路徑 commandData.Application.OpenAndActivateDocument(mp, op, true);