Hi all,
I'm new to both AutoCad (actually Map 3D) and AutoLisp. I need to create a plugin which creates the bounding boxes for all text objects, and write these bounding boxes to a layer named after a specific scheme, like OriginalLayerName_BoundingBox. So for an example, when a text object is on layer "rooms" the boundary should be created and stored on rooms_BoundingBox.
I'd be very grateful if you could share your LISP expertise with me. I've tried to step into Lisp and AutoCad for a few hours now already, but this task seems a bit too challenging for a "hello world".
Below is the basic script that I have working. It doesn't do more than create bounding boxes which are selected manually, using some fixed arguments to TCIRCLE as I need.
(defun c:MyBounds ( / ss)
(if (not bns_tcircle) (load "acettxt.lsp"))
(if (setq ss (ssget '((0 . "TEXT,MTEXT,ATTDEF"))))
(bns_tcircle ss "Variable" "Rectangles" "" 0.35)
)
(princ)
)
My attempts to reflect the functionality above resulted so far just in spagehtti code.
It would be great if you could edit my script for what I need, but even greater if you could also explain it to me.