MLeader Text Editing

Anonymous

MLeader Text Editing

Anonymous
Not applicable

I created a LISP routine which starts the MLEADER command, and sets the style, scale and layer for my different leaders.  It works OK, but I'd like to improve it.

 

The multileader inserts correctly but the inconvenience comes in editing the text.  When it comes to entering text while running the command, the command line only says "Enter text" - there is no blinking cursor or grips on the screen like you normally see with MTEXT.  At any rate, I can only enter a single word, because when I hit the space bar or enter, the command ends.  Which means I have to go back and double click on the word I entered and add more text.  Which is annoying.

 

How can I make it so that a click (and ONLY a click) will end the command?  I'd really like to be able to use the spacebar and enter to edit my text the first time rather than having to re-edit the MTEXT again.

0 Likes
Reply
Accepted solutions (1)
1,225 Views
3 Replies
Replies (3)

ВeekeeCZ
Consultant
Consultant

Try something like this. Create an MLEADER with no text first, then edit a text afterwards.

 

(defun c:MyMLeader ()
  (command "_.MLEADER" PAUSE PAUSE ""
           "_.TEXTEDIT" "_L")
  (while (> (getvar 'CMDACTIVE) 0)
   (command PAUSE))
)

 

0 Likes

patrick_35
Collaborator
Collaborator

Hi

 

If you want use space in textstring

(setq txt (getstring T "\nYour text : "))

@+

0 Likes

Anonymous
Not applicable
Accepted solution

Turns out I needed (INITCOMMANDVERSION) right before (MLEADER) in my LISP. Really simple, can't believe I've been fighting this for months.

0 Likes