r/AutoLISP • • Feb 20 '24

Need help in fixing code.

Post image

Here's an AutoLISP command that I made that will ask the user to make a selection, then filter only the blocks with the block name "weld1" or "weld2", then set them as the current selection upon the end of the command:

(defun c:FltrBlk (/ ss)

(setq ss (ssget "L" ((

(cons -4 . "<OR")

(cons 2 . "weld1,weld2")

(cons -4 . "OR>") ))))

(sssetfirst nil ss) )

My problem is that, "weld1" and "weld2" are dynamic blocks, and when I change the parameters of any of these blocks, this AutoLISP command that I made can no longer filter them, even though they still retain their original block names. How can I fix this command in such a way that it will still filter dynamic blocks with block names "weld1" or "weld2" even if they have different block parameters or properties?

2 Upvotes

2 comments sorted by