Jump to content

Small question about select blocks within LISP


K Baden

Recommended Posts

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)

)

Link to comment
Share on other sites

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)
)

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...