- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have Autocad LT 2025, and am trying to create a short AutoLisp routine to extract attributes from selected blocks which are located on multiple layout tabs, and cannot therefore be selected manually.
I am just testing the essentials of the routine, before adding any 'niceties' or error trapping etc. I have two block names to collect data from (plname and plname-na). The selection set is getting created correctly, but -attext doesn't seem to accept it. I have tried with and without the "" after passing the selection set, but execution is not progressing correctly beyond this point.
My familiarity with AutoLisp is pretty basic, so I'm probably missing something very obvious, but I can't figure out what!
Many thanks
(defun c:getplants ()
(setq tags (ssget "x" '((0 . "insert") (-4 . "<or") (2 . "plname") (2 . "plname-na") (-4 . "or>"))))
(command "-attext" "o" tags "" "c" "Plname-Template.txt" ".\\PlantList.txt")
(princ)
)
Solved! Go to Solution.