K Baden Posted October 19, 2017 Posted October 19, 2017 I am trying to select all blocks with the suffix "_PLAN". For some reason this command sucessfully loads but isnt recognized. I'm also not sure if the way i search for blocks with that suffix is correct. Any tips? (defun c:LAYERUPDATE () (setq sset1 (ssget "x" '((0 . "INSERT") (2 . "*_PLAN")))) (command ".chprop" sset1 "" "la" "ANTENNA" "") (princ) ) Quote
Aftertouch Posted October 19, 2017 Posted October 19, 2017 Command seems to work fine for me, Just make sure layer ANTENNA exists. Quote
David Bethel Posted October 19, 2017 Posted October 19, 2017 It works on my setup. Can you post a sample dwg ? -David Quote
ronjonp Posted October 19, 2017 Posted October 19, 2017 Should probably check that there is a selection set too... (defun c:layerupdate (/ sset1) ; < -- Locali(sz)e variables (if (setq sset1 (ssget "x" '((0 . "INSERT") (2 . "*_PLAN")))) (command ".chprop" sset1 "" "la" "ANTENNA" "") ) (princ) ) 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.