是否有人成功地在外部参照的多段线上使用WBlockCloneObjects()
本质上,我是从外部参照复制多段线,并使用WBlockCloneObjects()将其放置在宿主数据库中。这很好用。但是,如果随后手动分解多段线,则所有子实体都将消失
如果我尝试以编程方式分解多段线,则会在数据库中得到错误的结果
我基本上是在多段线对象上使用下面Autodesk链接中的代码。
http://docs.autodesk.com/ACD/2011/ESP/filesMDG/WS1a9193826455f5ff2566ffd511ff6f8c7ca-3f78.htm
我使用的是正确返回的PromptForNestedenty,然后作为newCloneColl<br>传递到这里
- Using docLock As DocumentLock = destDoc.LockDocument
- Using tr As Transaction = destDb.TransactionManager.StartTransaction()
- Try
- tr.TransactionManager.QueueForGraphicsFlush()
- destDb.WblockCloneObjects(newCloneColl, destDb.CurrentSpaceId, idMap, DuplicateRecordCloning.Ignore, False)
- tr.Commit()
- Catch ex As System.Exception
- destEd.WriteMessage(vbLf & "Error during NCOPY: " & ex.Message)
- End Try
- End Using
- End Using
<br>同样,在分解多段线对象之前,此操作正常。<br>
本帖以下内容被隐藏保护;需要你回复后,才能看到! 游客,如果您要查看本帖隐藏内容请 回复 |