Mtext settings

Nate Hunter

Usenet Archive
Joined
Dec 23, 2003
Messages
43
Reaction score
0
Is there a way to access the Mtext settings through lsp. I am paritcally interested in the underline feature in the mtext editor and the number of points.

Any help would be great thanks.
 
Not necessarily. You can create underlined text, using \L and \l such as:
(defun test (txt2uline / txt txtstr txtpos newtxt)
(setq txt (vlax-ename->vla-object (car (entsel "\nSelect text: "))) txtstr (vla-get-textstring txt) txtpos (vl-string-search txt2uline txtstr 0) newtxt (strcat (substr txtstr 1 txtpos) "\\L" (substr txtstr (1+ txtpos)(strlen txt2uline)) "\\l" (substr txtstr (+ (1+ txtpos)(strlen txt2uline)))) ) (vla-put-textstring txt newtxt)
)

See the AciveX and VBA Customization Guide for a list of all the codes that can be used. I'm not sure what Nate meant by "points".....if he meant the text height, that can be altered also.

Jeff
 
I sorry I should of clarified the points. I am using a quick leader and I would like to make sure my user only uses 3 points to draw the leader line.

Jeff Mishler said:
Not necessarily. You can create underlined text, using \L and \l such as:
(defun test (txt2uline / txt txtstr txtpos newtxt)
(setq txt (vlax-ename->vla-object (car (entsel "\nSelect text: "))) txtstr (vla-get-textstring txt) txtpos (vl-string-search txt2uline txtstr 0) newtxt (strcat (substr txtstr 1 txtpos) "\\L" (substr txtstr (1+ txtpos)(strlen txt2uline)) "\\l" (substr txtstr (+ (1+ txtpos)(strlen txt2uline)))) ) (vla-put-textstring txt newtxt)
)

See the AciveX and VBA Customization Guide for a list of all the codes that can be used. I'm not sure what Nate meant by "points".....if he meant the text height, that can be altered also.

Jeff
 

Latest threads

Back
Top