Tomislav Posted December 16, 2015 Share Posted December 16, 2015 Hello. I have one, probably silly question, but I can't find answer anywhere. When you have this lines of code (princ "\nSelect block for attribute extraction : ") (setq bl (ssget ":S" '((0 . "INSERT")(66 . 1)(8 . "cssa")))) it is displayed in the command bar as 'Select block for attribute extraction : ' and then in new line acad writes 'Select objects:' , so is there a way to omit this second line so it only displays my text? Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted December 16, 2015 Share Posted December 16, 2015 No, it's (ssget) main functionality that can't be omitted... Alternatively, you could try with combinations of (entsel) function and (if) that checks for that filter (INSERT,attributes,layer - "cssa")... Quote Link to comment Share on other sites More sharing options...
Tomislav Posted December 16, 2015 Author Share Posted December 16, 2015 Yes...only thing is that ads to code volume nevertheless, thank you for reply Quote Link to comment Share on other sites More sharing options...
satishrajdev Posted December 16, 2015 Share Posted December 16, 2015 (edited) You can use this Lee Mac's Function :- (DEFUN LM:SSGET (MSG PARAMS / SEL) (PRINC MSG) (SETVAR 'NOMUTT 1) (SETQ SEL (VL-CATCH-ALL-APPLY 'SSGET PARAMS)) (SETVAR 'NOMUTT 0) (IF (NOT (VL-CATCH-ALL-ERROR-P SEL)) SEL ) ) Example :- (LM:SSGET [color="magenta"][b]"\nSelect block for attribute extraction : "[/b][/color] [color="lime"][b]'(":S" ((0 . "INSERT")(66 . 1)(8 . "cssa")))[/b][/color]) Edited December 17, 2015 by satishrajdev Quote Link to comment Share on other sites More sharing options...
Tomislav Posted December 16, 2015 Author Share Posted December 16, 2015 well, that's great...thank you and Lee ...never crossed my mind to make it into function Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 16, 2015 Share Posted December 16, 2015 You're welcome! Quote Link to comment Share on other sites More sharing options...
Tomislav Posted December 16, 2015 Author Share Posted December 16, 2015 (edited) Well, I made this little lisp with LM:SSGET but it doesn't work, it just runs through, any ideas? (defun c:incssabl() (defun *error* (msg) (princ msg) ) ;_ defun (setq inspt(getpoint"\nSelect insertation point : ")) (setq station(cdr(assoc 1 (entget(ssname(lm:ssget "\nSelect STATION : " '("S:" '((0 . "TEXT,MTEXT"))))0))))) (setq height(cdr(assoc 1 (entget(ssname(lm:ssget "\nSelect HEIGHT on table : " '("S:" '((0 . "TEXT,MTEXT"))))0))))) (command "-insert" "cssabl" inspt "" "" station height) ) (DEFUN lm:ssget (MSG PARAMS / SEL) (PRINC MSG) (SETVAR 'NOMUTT 1) (SETQ SEL (VL-CATCH-ALL-APPLY 'SSGET PARAMS)) (SETVAR 'NOMUTT 0) (IF (NOT (VL-CATCH-ALL-ERROR-P SEL)) SEL ) ) Edited December 16, 2015 by Tomislav Quote Link to comment Share on other sites More sharing options...
satishrajdev Posted December 17, 2015 Share Posted December 17, 2015 Well, I made this little lisp with LM:SSGET but it doesn't work, it just runs through, any ideas? (defun c:incssabl() (defun *error* (msg) (princ msg) ) ;_ defun (setq inspt(getpoint"\nSelect insertation point : ")) (setq station(cdr(assoc 1 (entget(ssname(lm:ssget "\nSelect STATION : " '("S:" '((0 . "TEXT,MTEXT"))))0))))) (setq height(cdr(assoc 1 (entget(ssname(lm:ssget "\nSelect HEIGHT on table : " '("S:" '((0 . "TEXT,MTEXT"))))0))))) (command "-insert" "cssabl" inspt "" "" station height) ) (DEFUN lm:ssget (MSG PARAMS / SEL) (PRINC MSG) (SETVAR 'NOMUTT 1) (SETQ SEL (VL-CATCH-ALL-APPLY 'SSGET PARAMS)) (SETVAR 'NOMUTT 0) (IF (NOT (VL-CATCH-ALL-ERROR-P SEL)) SEL ) ) Remove ' from entity list & try once... (LM:SSGET "\nSelect STATION : " '(":E:S" ((0 . "TEXT,METXT")))) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 17, 2015 Share Posted December 17, 2015 Well, I made this little lisp with LM:SSGET but it doesn't work, it just runs through, any ideas? Further to Satish's reponse above, there are two issues with your code: 1. "S:" is not a valid ssget mode string, this should be ":S" - you may refer to my ssget function reference for a list of valid mode strings. 2. '("S:" '((0 . "TEXT,MTEXT"))) Since the expression following the first quote is already marked as literal, there is no need for the second quote within this list. Quote Link to comment Share on other sites More sharing options...
Tomislav Posted December 18, 2015 Author Share Posted December 18, 2015 (edited) Finally got the time to see this answers and to thank you guys... Satish and Lee... S: was my typing mistake and have copied it to to second call to ssget so double mistake I also didn't notice this quota doubling cause of copy/paste but now, when you pointed it out, it's obvious, so thanx again for your help p.s. that tutorial Lee about undocumented stuff is great.. Edited December 18, 2015 by Tomislav Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 18, 2015 Share Posted December 18, 2015 Thank you Tomislav - I'm glad it helped! 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.