TemporaryCAD Posted August 16, 2022 Posted August 16, 2022 (edited) Hello, I'm trying to automate my titleblock to remove possibility of silly errors. The titleblock is edited through an enhanced attribute editor. How would I go about accessing it through autolisp? Thanks! EDIT: Well, I should try more before I ask - you can access the data through vlax-invoke! I'm leaving this up so others who are looking can find this useful. Does anyone have a list of vlax-invoke values? Right now I'm using 'getattributes but I'd like to see what is possible. I'm going to use this thread as a live update of my progress. When I try using (apply 'vla-get-textstring attributes), I get a warning for having too many parameters! What is the limit for apply, and is there a workaround? Since I'm just using this for info, what do you pass into a multivariate lambda function? i.e. (lambda (x y ) (x + y) lst) what would be lst? (setq todo (list (list 0 "1") (list 1 (strcat getMM "-" getDD "-" getYY)) (list 2 name) (list 3 "Initial Release.") (list 33 name) (list 34 name) (list 35 sheetnum) (list 24 projname) ) (mapcar '(lambda (no na) (vla-put-textstring (nth no atts) na)) (todo)) Is what I have now, but it doesn't work at all. Edited August 16, 2022 by TemporaryCAD Quote
Steven P Posted August 16, 2022 Posted August 16, 2022 (edited) Would this be any use? https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/edit-attribute-value-with-lisp/td-p/6927162 If you want to set up several drawings you can also look at Lee Macs Batch Attribute Editor - hands with a border to put in client details in a series for example, not so good to out in individual details like a drawing title - but does what it does very well Edited August 16, 2022 by Steven P Quote
mhupp Posted August 16, 2022 Posted August 16, 2022 (edited) For list 1 (menucmd "M=$(edtime, $(getvar,date),DD-MO-YYYY)") Edited August 16, 2022 by mhupp Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.