Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is it possible to clone a polyline so that it has a new objectId?
Solved! Go to Solution.
Is it possible to clone a polyline so that it has a new objectId?
Solved! Go to Solution.
Cloning any DBObject produces a new object that is not in any Database. A DBObject cannot have an ObjectId unless it is added to a Database. You can call BlockTableRecord.AppendEntity() and pass it a new object (such as the one returned by calling Clone()), and it will append the entity to the BlockTableRecord and assign an ObjectId to it.
You can also use Database.DeepCloneObjects() to clone existing entities to a new owner or to the same owner, and that API will take care of adding the clones to the Database/owner., and assigning them ObjectIds.
You can search this group for 'DeepCloneObjects' to find examples of its use, or wait for someone to write one for you (sorry, I don't have time for that).
i can code i just needed to know the procedure. thanks for the advice and will give it a try.