话不多说,直接代码,整个过程不需要发起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);

 

posted on 2018-05-29 09:29  airforce094  阅读(701)  评论(0编辑  收藏  举报