pman860507 Posted August 23, 2011 Share Posted August 23, 2011 can anyone direct me to a good tutorial on Ssget filters. mostly how to use the (-4 . " Example: E15,E1,E24... its pretty long i know you it kind of like this. (ssget "X" '((2 . "E15))) but I'm not exactly sure how to do it with multiple conditions. Though it might look something like this put it returns nothing. (setq ss (ssget "X" '((-4 . "<OR")(-4 . "<AND")(2 . "E14")(2 . "E15")(2 . "E1") (2 . "E21")(2 . "L25")(2 . "E24")(2 . "E23") (2 . "E8")(2 . "E18")(2 . "F16")(2 . "E21") (2 . "F18")(2 . "E12")(2 . "L24")(2 . "M3") (2 . "M11")(2 . "P15")(2 . "P14")(2 . "P17") (2 . "A1")(2 . "A3")(2 . "A6")(2 . "EA7")(-4 . "AND>")(-4 . "OR>")))) Quote Link to comment Share on other sites More sharing options...
Tharwat Posted August 23, 2011 Share Posted August 23, 2011 Check http://www.afralisp.net/autolisp/tutorials/selection-set-filters.php Quote Link to comment Share on other sites More sharing options...
pman860507 Posted August 23, 2011 Author Share Posted August 23, 2011 I got this but i will look around the site thanks. [b]Error: Page not found[/b] [b]AfraLISP has changed![/b] [b]Oops![/b] Something went wrong. Either a link you clicked didn't work, or you typed something funny in your browser's address bar or more likely, you're using an old link. Please bear with us while AfraLISP is redeveloped - some content has moved. You might like to try looking for the page you want by starting back at the site [url="http://www.afralisp.net/index.php"]homepage[/url] or by using the navigation bar, above. Alternatively, you could try the search box (top right) or the [url="http://www.afralisp.net/site-map/"]site map[/url]. All the original AfraLISP content is still available online so if there is some content we haven't got round to updating yet, you'll find it in the [url="http://archive.afralisp.net/"]AfraLISP Archive[/url]. If you still can't find what you're looking for (as U2 might say), you might like to use the [url="http://www.afralisp.net/contact/"]contact form[/url] to tell us where we're going wrong. Apologies for the inconvenience. Quote Link to comment Share on other sites More sharing options...
pman860507 Posted August 23, 2011 Author Share Posted August 23, 2011 thanks i found it. the problem was the (-4 . "AND") it made it look for blocks that met the criteria for all of them. (setq ss (ssget "X" '((-4 . "<OR")(2 . "E14")(2 . "E15")(2 . "E1") (2 . "E21")(2 . "L25")(2 . "E24")(2 . "E23") (2 . "E8")(2 . "E18")(2 . "F16")(2 . "E21") (2 . "F18")(2 . "E12")(2 . "L24")(2 . "M3") (2 . "M11")(2 . "P15")(2 . "P14")(2 . "P17") (2 . "A1")(2 . "A3")(2 . "A6")(2 . "EA7")(-4 . "OR>")))) works great. Thanks. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted August 23, 2011 Share Posted August 23, 2011 I got this but i will look around the site thanks. [b]Error: Page not found[/b] maybe due to the smiley that was beside it , anyway it is modified . Quote Link to comment Share on other sites More sharing options...
pman860507 Posted August 23, 2011 Author Share Posted August 23, 2011 I think that was the problem. thanks for the help. Quote Link to comment Share on other sites More sharing options...
pman860507 Posted August 23, 2011 Author Share Posted August 23, 2011 I guess while we are on the topic does anyone know if its possible to do ( 41 . "-*") to select them if they have a negative scale factor on x It's not a big deal but it would be nice to only select the blocks with negative values on x. so i can add a counter) if its not possible i just wont have it. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted August 23, 2011 Share Posted August 23, 2011 if you mean the x factor for Blocks , I think it is not possible because it is a real negative value. What are you trying to accomplish ? Quote Link to comment Share on other sites More sharing options...
pman860507 Posted August 23, 2011 Author Share Posted August 23, 2011 when people mirror blocks it changes the block to look backwards because the X scale factor is Negative. this is just changing them back to positive. Right now it selects all the blocks that meet the criteria so my block count would have all the blocks that have + and - values. if i can only have it go though - values then my counter would be accurate, but like i said its not really needed if its a pain in the .... Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 23, 2011 Share Posted August 23, 2011 Since you can use wildcard matches with Selection Set filter list strings, you can combine your block names into a single wildcard pattern: (ssget "_X" '((0 . "INSERT") (2 . "E14,E15,E1 ... "))) I guess while we are on the topic does anyone know if its possible to do ( 41 . "-*") to select them if they have a negative scale factor on x. (ssget "_X" '((0 . "INSERT") (-4 . "<") (41 . 0.0))) I suggest you read these sections of the Visual LISP IDE (VLIDE) Help Documentation: + Using the AutoLISP Language | +--+ Using AutoLISP to Manipulate AutoCAD Objects | +--+ Selection Set Handling | +--+ Selection Set Filter Lists | +--> [color=red]Relational Tests[/color] | +--> [color=red]Logical Grouping of Filter Tests[/color] Quote Link to comment Share on other sites More sharing options...
pman860507 Posted August 23, 2011 Author Share Posted August 23, 2011 i completely forgot about less. (wow one of those days.) I really do need to get on VISUAL LISP and i plan to soon. will check out that documentation thanks. UPDATE- i got it all working thanks all. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 23, 2011 Share Posted August 23, 2011 I really do need to get on VISUAL LISP and i plan to soon. will check out that documentation thanks. Visual LISP is not a necessity - I would strongly recommend a good grasp of Vanilla AutoLISP before embarking on Visual LISP, don't be misled by the title of both the help documentation & editor. 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.