JasonS Posted February 18, 2011 Posted February 18, 2011 Hi all, I'm hoping someone who knows lisp and object codes could help me convert the attached filter setup into a ssget lisp, so I can call it on the command line, please! I've been looking at this thread, but I can't puzzle my way through it so far. My lisp skills are terrible to nonexistent! http://www.cadtutor.net/forum/showthread.php?21217-FILTER-Command I've attached a screenshot of the filter setup, and here's a clip from the filter.nfl file, if that's more helpful: (-4 . "(1 . "ose to any third party.") (1 . "3510") (-4 . "=") (62 . 166) (-4 . "=") (62 . 72) (-4 . "=") (62 . 251) (2 . "attr2-edit") (-4 . "(8 . "Paper Text") (0 . "*POLYLINE") (-4 . "AND>") (-4 . "OR>") :ai_str|PG ** Begin OR Text Value = ose to any third party. Text Value = 3510 Color = Color Color = Color Color = Color Block Name = attr2-edit ** Begin AND Layer = Paper Text Object = Polyline ** End AND ** End OR Thanks so much for the help...this will save me a ton of repetitive grind time! Quote
tzframpton Posted February 18, 2011 Posted February 18, 2011 Not to take away from the LISP routine you're after, but you can save Filter Selections for future use. Didn't know if this would be good enough for your needs or not, although to be able to start a LISP routine directly from the Command Line would save a step. Quote
JasonS Posted February 18, 2011 Author Posted February 18, 2011 Thanks for the thought, StykFacE. I do have it saved, but since I can't manipulate the Filter dialog from the command line once it starts, I'd much rather type a command alias and let 'er rip. I do this A LOT... It's set up to select our old titleblock as I convert to the new, improved one I made for us. Quote
BlackBox Posted February 18, 2011 Posted February 18, 2011 Try this... (defun c:FOO () (sssetfirst nil (ssget "_x" '((-4 . "<OR") (1 . "ose to any third party.") (1 . "3510") (-4 . "=") (62 . 166) (-4 . "=") (62 . 72) (-4 . "=") (62 . 251) (2 . "attr2-edit") (-4 . "<AND") (8 . "Paper Text") (0 . "*POLYLINE") (-4 . "AND>") (-4 . "OR>")))) (princ)) Quote
BIGAL Posted February 20, 2011 Posted February 20, 2011 Dont forget the _x searches all the drawing you may want to use other filters like "W" "WP" "CP" Quote
JasonS Posted February 21, 2011 Author Posted February 21, 2011 Thanks for the code RenderMan! I tried it, and it works perfectly. The only part I'm not getting is that it runs when I load it, but I can't call it again as a commmand...is it something I'm doing, or is the code missing something that sets that up? It looks pretty normal to my mostly untrained eye in terms of the defun. Thanks for the help! 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.