Jump to content

question on in-line text in command bar


Tomislav

Recommended Posts

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?

Link to comment
Share on other sites

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")...

Link to comment
Share on other sites

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 by satishrajdev
Link to comment
Share on other sites

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 by Tomislav
Link to comment
Share on other sites

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"))))

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Tomislav
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...