liamdonnelly0209 Posted February 27, 2014 Share Posted February 27, 2014 Hi All. I am trying to achieve the following: for example... in 100 floor plans there are blocks that have certain attribute values. i want to be able to create a script/lisp that will find all blocks that include a certain piece of text ie "window" in the attribute value and change the block to a certain colour. Essentially it is the same way that the "FIND" command works but via command line/lisp/script etc instead. This will be so i can apply this specific task without user input on the 100 floor plans. Is there a way to do this as ive searched hundreds of terms/forums/ideas etc and came up with only find and replace tools or change all text in a drawing to certain colour. Your help is greatly appreciated =] Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted February 27, 2014 Share Posted February 27, 2014 The attached program should help. Select Blocks by Attribute Value.lsp Quote Link to comment Share on other sites More sharing options...
liamdonnelly0209 Posted February 28, 2014 Author Share Posted February 28, 2014 Lee you are an absolute Genius. And thank you for your very quick response, i didnt expect anyone to get this one in one go either =] Thank you so much =] Quote Link to comment Share on other sites More sharing options...
liamdonnelly0209 Posted February 28, 2014 Author Share Posted February 28, 2014 Now that it selects the blocks of the attribute i wanted, how would i change the colour of those blocks if i was to create a script to run on the drawings? as i am trying to essentially set up 100 drawings so when i reopen them i dont have to search for the blocks to change/work on as they have already been coloured. Thats the aim. So each week it could vary and the colour could change, so thats why i was hoping to vary them with different scripts per week. if that makes sense Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 1, 2014 Share Posted March 1, 2014 Your probably looking for a line like this (vla-put-Layer obj "0") ; this is layer to "0" ;make it this (vla-put-Color obj "3") ; turn object to color "3" ; ; (setq x ("\nEnter new color number:)) (vla-put-Color obj x) Quote Link to comment Share on other sites More sharing options...
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.