TheSwamp

Code Red => .NET => Topic started by: tik on December 20, 2011, 02:27:02 PM

Title: How to get coordinates of entity.
Post by: tik 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.

Title: Re: How to get coordinates of entity.
Post by: kaefer 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.
Title: Re: How to get coordinates of entity.
Post by: tik on December 21, 2011, 08:45:37 AM
Kaefer,

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

Tik.