Hi, all I want to do is create an icon, in a new ribbon tab, that sets the layer to text, and launches the mleader command - so the user can create their mleader on the correct layer. I already have this functionality using the tool palette, but wanted to add it to the ribbon as well.
So I figured the easiest way to do it would be write a little lisp routine that makes the layer, then launches the mleader command. I could then call the routine from my icon on the ribbon.
It was all going well until the mleader command ran, and I couldn't add the text on-screen, like I normally would - it switched to the command line, and everytime I press space it finishes the command - no good.
My attempt:
(defun c:ml01(/ ml01)
(command "cmdecho" "0")
(command "-layer" "m" "text" "c" "4" "" "" )
(command "cmleaderstyle" "text")
(command "cmdecho" "1")
(command ".mleader" pause)
(princ)
)
Any ideas?
Thanks.
Solved! Go to Solution.
Solved by hmsilva. Go to Solution.
@borderliner wrote:
Holy cow, that was like pulling teeth - I've had more fun at the dentist.
@borderliner wrote:
But I've got it now, using phanaem's code to convert the numbers (thanks phanaem).
Glad you've got it!
Henrique