Message 1 of 12
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I feel absurd asking, but I can't seem to get this. I need to select one basic block in a layout as part of a LISP. There is one instance of the block in each layout. I've tried many variations of
(if (setq ss (ssget "_X" '((0 . "INSERT") (2 . "Title Block - To Sheet # anno") (66 . 1))))
(repeat (1+ (sslength ss))
(setq AdjBlk (ssname ss 0))
)
)
or the simpler
(setq insert_sset (ssget "_X" '((0 . "INSERT") (66 . 1) (2 . "Title Block - To Sheet # anno"))))
(setq AdjBlk insert_sset)
or the more complicated
(if (setq insert_sset (ssget "_X" (list (cons 410 LytLbl) '(0 . "INSERT"))))
(vl-remove-if '(lambda (insert) (/= (strcase "Title Block - To Sheet # anno") (strcase (vla-get-effectivename insert))))
(mapcar 'vlax-ename->vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex insert_sset))))
)
)
but all I get is a nil value for AdjBlk
If anyone could point out what's probably obvious, I'd appreciate it.
Thanks,
Gorra
Edited to add:
I think I've figured out the problem, the selection is making a selection set, and I've been trying to work with it using list commands.
Solved! Go to Solution.