.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
get object Id of the newly created entity.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
How can I get the object id of the just created entity.
acTrans.AddNewlyCreatedDBObject(acPoint, true);
acTrans.Commit();Selected the point on the dwg with PromptPointResult result value and added it.
Then I want the objectid of this acPoint, to do my next operation.
Please suggest.
Solved! Go to Solution.
Re : get object Id of the newly created entity.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
If you appened this DBPoint to some BlockTableRecord before adding it to the Transaction, the BlocktTableRecord.Appendentity() method returns the ObjectId of the entity.
Re: get object Id of the newly created entity.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Re : get object Id of the newly created entity.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I'm afraid you're confusing DatabaseServices.DBPoint which is a graphic entity with Geometry.Point3d which is an abstract geometrical object.
The first one has an ObjectId affected as soon as it's added to a Databse, IOW appended to a BlockTableRecord (space or block definition)
The second one is the tye returned by PromptPointResult.Value and will never be databse resident nor have an ObjectId. It's only to be used for geometric purposes.
Re : get object Id of the newly created entity.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thanks All.



