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.
Solved by Alexander.Rivilis. Go to Solution.
If acPoint is database resident object, then acPoint.ObjectId return ObjectId of this object/entity
Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"
Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
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.
Can't find what you're looking for? Ask the community or share your knowledge.