Hi, I am creating a template for the consulting agency I work for and there are various title blocks with effectively the same information in each as attributes, but organized into different size layouts and orientations (e.g. "11x17" and "24x36 Vertical"). I am wondering 2 things:
1. If there someone knows of a simple lisp that allows me to open the same attribute dialog box that launches when you insert the block. It can work via selection set or any other manner simple enough to the user.
2. If there is a way to have these attributes as common across all block definitions (i.e. for title blocks using attributes such as "date", "dwg title" etc.) and therefore only require one instance of user input into the attribute dialog box which then distributes the set info across the block definitions, and henceforth, the layouts.
Help is sincerely needed as I am a novice when it comes to autolisp (I only have experience in C++ and html).
Thank you!
Solved! Go to Solution.
Solved by hmsilva. Go to Solution.
One way is to make BLOCKs of each title block,
and use the same 'tag' names for each matching attibute.
And attend to the details of the attributes for their characteristics,
and for the size that the text will use in the image.
As a starting point,
(defun c:demo (/ ss) (if (and (princ "\nSelect a title block: ") (setq ss (ssget "_+.:E:S:L" '((0 . "INSERT") (66 . 1)))) ) (progn (initdia) (command "_.attedit" (ssname ss 0)) (while (> (getvar 'cmdactive) 0) (command "\\") ) ) ) (princ) )
Hope this helps,
Henrique
@JonathanRodrigues wrote:
@hmsilva does this mean that "_.attedit" is the specific command to bring up the attribute dialog box where the user input is listed next to the prompt?
Jonathan,
the command 'attedit' will bring up the attribute dialog box, but if in a code, we call the command without call the 'initdia' function first, the code will call the command line version...
Hope this helps,
Henrique