LISP draws multileader but text does not show up

LISP draws multileader but text does not show up

Anonymous
Not applicable
718 Views
2 Replies
Message 1 of 3

LISP draws multileader but text does not show up

Anonymous
Not applicable

Hello,

  I have been starting to incorporate multileaders into my routines, as they are handy, but have encounter a problem that I can't seem to find a solution to resolve.  When the text for the multileader is fairly short, there is no problem drawing the mleader and text.  If the text starts to get a bit lengthy, the routine still draws the mleader, but no text is inserted.  Below is a quick routine to get my point across.  The routine has no problem inserting four lines of text, but seems to have a problem with more than that.  I have attached a simple CAD dwg to show how it looks when I run the routine below.  I am not sure if there is a setting that limits the number of characters or lines in the text, or some other issue, but your help is always greatly appreciated.

Thanks.
Marty

 

;start of code

; MLeaderExample.LSP
(defun C:MLX ( )


; variables
(setq DIMSCALE2 128)
(setq CMLEADERSTYLE2 "PM MLEADER 128")
(setq LAYER3 "TEXT-DETAIL")


; set-up
(command "dimscale" DIMSCALE2)
(command "cmleaderstyle" CMLEADERSTYLE2)
(command "layer" "m" LAYER3 "")
(setvar "osmode" 0)
(setvar "orthomode" 0)
(command "regen")


; mleader
(setq TXTA "THIS IS THE FIRST LINE OF TEXT\\P")
(setq TXTB "THIS IS THE SECOND LINE OF TEXT\\P")
(setq TXTC "THIS IS THE THIRD LINE OF TEXT\\P")
(setq TXTD "THIS IS THE FOURTH LINE OF TEXT\\P")
(setq TXTE "THIS IS THE FIFTH LINE OF TEXT\\P")
(setq TXTF "THIS IS THE SIXTH LINE OF TEXT\\P")
(setq TXTG "THIS IS THE SEVENTH LINE OF TEXT\\P")
(setq TXTH "THIS IS THE EIGHTH LINE OF TEXT\\P")

 

(setq TXT1 (strcat TXTA TXTB TXTC TXTD))
(setq TXT2 (strcat TXTA TXTB TXTC TXTD TXTE TXTF TXTG TXTH))

 

(command "_mleader" "h" "o" "m" "2" "x" PAUSE PAUSE TXT1)
(command "_mleader" "h" "o" "m" "2" "x" PAUSE PAUSE TXT2)


; end
(command (graphscr))
(Prompt "") (terpri)
(Prompt "---") (terpri)
(Prompt "Routine is complete!") (terpri)

(princ)
)
(princ)

;end of code

0 Likes
Accepted solutions (2)
719 Views
2 Replies
Replies (2)
Message 2 of 3

ВeekeeCZ
Consultant
Consultant
Accepted solution

I would try it backwards...

 

(command "_mleader" "h" "o" "m" "2" "x" PAUSE PAUSE "")
(vla-put-textstring (vlax-ename->vla-object (entlast)) TXT2)
Message 3 of 3

Anonymous
Not applicable
Accepted solution

That did the trick!  Thanks so much for the help!

0 Likes