Bounds refer to the rectangular area that encloses an object. In this case, the bounds of a circle refer to the rectangular area that encloses the circle. The bounds are defined by two points: the minimum point and the maximum point. The minimum point is the lower-left corner of the rectangle, and the maximum point is the upper-right corner of the rectangle. I hope this helps!
The GeometricExtents property of an AutoCAD entity represents the rectangular area that encloses the entity. It is defined by two points: the minimum point and the maximum point. The minimum point is the lower-left corner of the rectangle, and the maximum point is the upper-right corner of the rectangle. The GeometricExtents property is an Extents3d object that has MinPoint and MaxPoint properties that define the lower-left and upper-right corners of the rectangle, respectively
Sample Code to get bounds of selected Circle
[CommandMethod("GetBoundsOfSelectedCircle")]publicvoidGetBoundsOfSelectedCircle(){// Select a circlePromptSelectionResultselRes=ActiveUtil.Editor.GetSelection();if(selRes.Status!=PromptStatus.OK)return;// Get the selected circleusing(Transactiontr=ActiveUtil.Database.TransactionManager.StartTransaction()){Circlecircle=tr.GetObject(selRes.Value[0].ObjectId,OpenMode.ForRead)asCircle;// Get the bounds of the circleExtents3dbounds=circle.GeometricExtents;// Display the boundsActiveUtil.Editor.WriteMessage("\nBounds of selected circle:");ActiveUtil.Editor.WriteMessage("\n Min point: "+bounds.MinPoint.ToString());ActiveUtil.Editor.WriteMessage("\n Max point: "+bounds.MaxPoint.ToString());tr.Commit();}}
Sample code to get bounds of selected block reference
[CommandMethod("GetBoundsOfSelectedBlockReference")]publicvoidGetBoundsOfSelectedBlockReference(){// Select a circlePromptSelectionResultselRes=ActiveUtil.Editor.GetSelection();if(selRes.Status!=PromptStatus.OK)return;// Get the selected circleusing(Transactiontr=ActiveUtil.Database.TransactionManager.StartTransaction()){varblockRef=selRes.Value[0].ObjectId.GetObject<BlockReference>();// Get the bounds of the circleExtents3dbounds=blockRef.GeometricExtents;// Display the boundsActiveUtil.Editor.WriteMessage("\nBounds of selected block Reference:");ActiveUtil.Editor.WriteMessage("\n Min point: "+bounds.MinPoint.ToString());ActiveUtil.Editor.WriteMessage("\n Max point: "+bounds.MaxPoint.ToString());tr.Commit();}}