Im trying to figure this out, appreciate if someone could give me some tips on solving this one.
Is there any method to get the center point of a blockreference without itīs attributes?
If i do like this...
public static Point3d CenterPoint3D(Entity entity)
{
Extents3d ext = entity.GeometricExtents; //get entity boundary
Point3d center = new Point3d((ext.MinPoint.X + ext.MaxPoint.X) * 0.5, //calculate center point
(ext.MinPoint.Y + ext.MaxPoint.Y) * 0.5,
(ext.MinPoint.Z + ext.MaxPoint.Z) * 0.5);
return center; //return with center point
}
i get the centerpoint but with itīs attributes.
I only want the "graphical" objects centerpoint, since itīs attributes can be placed in different locations.
Do i need to open the block definition and calculate the center point of it without it attributes or is there an easier way?
Any suggestions on how to do this in an as easy and correct way as possible?