Author Topic: How to get coordinates of entity.  (Read 1438 times)

0 Members and 1 Guest are viewing this topic.

tik

  • Guest
How to get coordinates of entity.
« on: December 20, 2011, 02:27:02 PM »
I have a ObjectId for a object which I picked from the drawing using GetEntity function and then I explode that object to get DBObjectCollection. Is it possible to know the coordinates of each DBObject in the collection without converting it into a type like Line, Arc etc.


kaefer

  • Guest
Re: How to get coordinates of entity.
« Reply #1 on: December 20, 2011, 03:22:14 PM »
I have a ObjectId for a object which I picked from the drawing using GetEntity function and then I explode that object to get DBObjectCollection. Is it possible to know the coordinates of each DBObject in the collection without converting it into a type like Line, Arc etc.

No it isn't because DBObject has no graphical representation. You could at least try to cast to Entity and use GeometricExtents; or if you have curves to type Curve, which takes care of Arc, Circle, Ellipse, Spline, and so on. If in doubt, look at the inheritance relationship.

tik

  • Guest
Re: How to get coordinates of entity.
« Reply #2 on: December 21, 2011, 08:45:37 AM »
Kaefer,

Thanks for the reply, I will give that a try.

Tik.