Hello,
With the code below the draworder is not retained ,
does anynone knows how to retain the draworder in a .net copy command?
Function MaakKopie(ByVal objIds As ObjectIdCollection) As ObjectIdCollection MaakKopie = New ObjectIdCollection Dim doc = Application.DocumentManager.MdiActiveDocument Dim dwg = doc.Database Using doc.lockdocument Using transactie = doc.TransactionManager.StartTransaction() Try Dim s As BlockTableRecord s = transactie.GetObject(dwg.CurrentSpaceId, OpenMode.ForWrite) For Each objId In objIds Dim Element As Entity Element = transactie.GetObject(objId, OpenMode.ForWrite) Dim Kopie = Element.Clone Dim id = s.AppendEntity(Kopie) transactie.AddNewlyCreatedDBObject(Kopie, True) MaakKopie.Add(id) Next transactie.Commit() Catch ex As Exception MsgBox("Er ging iets fout: " & vbCrLf & ex.Message) MaakKopie = Nothing End Try End Using End Using End Function
Regards,
Solved! Go to Solution.
Solved by augusto.goncalves. Go to Solution.
Hi,
You may need to access the source BlockTableRecord.DrawOrderTableId and propagate the order obtained from GetFullDrawOrder to the destination BlockTableRecord. Check a related sample code here http://through-the-interface.typepad.com/through_the_interface/2007/03/manipulating_th.html
Hope this help.
Augusto Goncalves
Autodesk Developer Network
Thanks augusto,
I found that link too and
after some puzzling that did the job!
Can't find what you're looking for? Ask the community or share your knowledge.