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.
Solved! Go to Solution.
If you appened this DBPoint to some BlockTableRecord before adding it to the Transaction, the BlocktTableRecord.Appendentity() method returns the ObjectId of the entity.
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.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register