SAFeSTeR Posted December 17, 2015 Posted December 17, 2015 (edited) Example: I have 4 schematic blocks of a valve (existing, proposed new, proposed abandon, abandoned) and created a dynamic block of them all by applying invisibility states. Now I need to select all of the 'existing' valves to change them to 'proposed abandon'. I'm unable to select the invisibility states using QSELECT so I'm wondered if there is a LISP or something that can do this? Edited December 21, 2015 by SAFeSTeR Quote
TheCADnoob Posted December 17, 2015 Posted December 17, 2015 Example:I have 4 schematic blocks of a valve (existing, proposed new, proposed abandon, abandoned) and created a dynamic block of them all by applying invisibility states. Now I need to select all of the 'existing' valves to change them to 'proposed abandon'. I'm unable to select the invisibility states using QSELECT so I'm wondered if there is a LISP or something that can do this? I believe you can change the visibility sate in the properties dialog. Select similar and change visibility state in under the custom section of the properties menu. Quote
SAFeSTeR Posted December 17, 2015 Author Posted December 17, 2015 I know how to change the invisibility state itself, I just need to select multiple instances of a dynamic block of a certain invisibilty state while not selecting blocks using a different state. Quote
TheCADnoob Posted December 17, 2015 Posted December 17, 2015 I know how to change the invisibility state itself, I just need to select multiple instances of a dynamic block of a certain invisibilty state while not selecting blocks using a different state. ahh gotcha... coming at me with all that reading and stuff.... I found this. https://forums.autodesk.com/t5/autocad-2007-2008-2009/select-dynmic-blocks-based-on-visibility-states/td-p/1812443 it seems to work as far as selecting them but i havent been able to get it to exit the call with the selection. Quote
SAFeSTeR Posted December 17, 2015 Author Posted December 17, 2015 Thanks, it almost works... I can get it to select the required blocks but the properties box remains as if nothing is selected and the command line displays "Select objects". When I right click, the LISP ends and the blocks are no longer highlighted. I don't see what purpose this LISP serves Quote
RobDraw Posted December 17, 2015 Posted December 17, 2015 Does typing P (for previous selection set) get them back so you can change the properties? Quote
SAFeSTeR Posted December 17, 2015 Author Posted December 17, 2015 Does typing P (for previous selection set) get them back so you can change the properties? Nope, that was the first thing I tried. When selected during the LISP, it's not like a normal selection with the window. They are highlighted, but none of the dynamic grips are visible. Quote
RobDraw Posted December 17, 2015 Posted December 17, 2015 It was a shot in the dark as I don't write LISP. Quote
TheCADnoob Posted December 17, 2015 Posted December 17, 2015 Nor do I, thanks anyway. got it!! in the Lisp you copy and create the file the last part is the select code ... (command "select" ssfvis) (princ) ... Change "select" to "pselect" ... (command "pselect" ssfvis) (princ) ... Works fine now Quote
SAFeSTeR Posted December 18, 2015 Author Posted December 18, 2015 Change "select" to "pselect" ... (command "pselect" ssfvis) (princ) ... Works fine now Thanks for trying but I get an error now when I enter the visibility state name - nil ; error: bad argument type: stringp nil Quote
TheCADnoob Posted December 18, 2015 Posted December 18, 2015 Thanks for trying but I get an error now when I enter the visibility state name - nil ; error: bad argument type: stringp nil you will get that if you leave it blank or if you type it in wrong. Its a 'dumb' program so its case sensitive. Make sure you type it just like it appears in the properties menu. Quote
SAFeSTeR Posted December 18, 2015 Author Posted December 18, 2015 you will get that if you leave it blank or if you type it in wrong. Its a 'dumb' program so its case sensitive. Make sure you type it just like it appears in the properties menu. That's what I've been doing all along. Are you using these LISP's and getting them to work? If so then when I'm less busy I'll upload my blocks and see if you can spend a few minutes with them. Quote
TheCADnoob Posted December 18, 2015 Posted December 18, 2015 yea, its working on my end. shoot em over and ill look. Quote
SAFeSTeR Posted December 21, 2015 Author Posted December 21, 2015 Well, I was about to upload an example for you but thought I'd give it one more try before doing so and it worked! I guess I made a typo when trying before Thanks very much for your help, it's really appreciated Quote
TheCADnoob Posted December 21, 2015 Posted December 21, 2015 Well, I was about to upload an example for you but thought I'd give it one more try before doing so and it worked! I guess I made a typo when trying before Thanks very much for your help, it's really appreciated Glad to help, though majority credit goes to the poster/creater of the lisp, but happy to play my small part 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.