Jump to content

Selecting blocks


Recommended Posts

Hello again,

My question this go around is to see if there is a way you can select blocks one after another with out having to leave the keyboard. i am having to change every block in a drawing to reflect new cubical numbers. going from the mouse to keyboard is killing my wrist. i would like to finish changing attributes on a block close it then go to the next block have it open and start making changes. Possible or keep dreaming?

Link to comment
Share on other sites

Can be done via program pick a block to get name, enter attribute tag name zoom to first block at a preset scale, then a simple prompt enter say a number, block updates, zoom next and so on.

 

Just find any of the posts in the lisp section that change attributes pretty simple to add a question line.

 

 
(setq bname (getstring "\nEnter block name"))
(setq tagname (getstring "\nEnter tag name"))
(setq ss1 (ssget "x"  (list (cons 0 "INSERT") (cons 2 bname))))
(setq x (sslength ss1))
(setq y 0)
(repeat x 
(foreach att (vlax-invoke (vlax-ename->vla-object (ssname SS1 y )) 'getattributes)
       (if (= tagname (strcase (vla-get-tagstring att)))
(progn        
(setq newstr1 (getstring "\Enter new value"))
(vla-put-textstring att newstr1) 
(setq y (+ 1 Y))
)
) ; end if
) ; foreach

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