First select everything in model space to a saved selection set:
Code:
(setq ss (ssget "_X" '((410 . "Model"))))
Then pass that to one of the functions, e.g.
Code:
(setq bounds (ACET-GEOM-SS-EXTENTS ss 0.1))
This returns a list containing 2 points. If I run it on your sample drawing I get:
Code:
((560.385 178.788 -1.0e-008) (1414.27 766.163 1.0e-008))
The 1st (i.e. car) is the bottom left, and the 2nd (i.e. cadr) is the top right.There's some very small Z values due to the fuzzyness of 0.1. You can omit this by modifying the points, e.g.
Code:
(setq pt1 (list (car (car bounds)) (cadr (car bounds)) 0.0)
pt2 (list (car (cadr bounds)) (cadr (cadr bounds)) 0.0)
)
This generates a "rectangle" bounds across everything in model space - i.e. everything is contained within that rectangle.
However, you seem to already have a border. Would you rather have this for the border? In which case change the ssget to:
Code:
(princ "\nSelect border: ")
(setq ss (ssget))