vla-UpdateMTextAttribute Does not "un-wrap" Attribute text

vla-UpdateMTextAttribute Does not "un-wrap" Attribute text

kerrcad
Contributor Contributor
216 Views
1 Reply
Message 1 of 2

vla-UpdateMTextAttribute Does not "un-wrap" Attribute text

kerrcad
Contributor
Contributor

I have created a multiline attribute, with a mask, that will contain a street address.  Regardless of the text length, I want the text to remain single line as opposed to word wrapping.

 

When I update the attribute property via "vla-put-MTextBoundaryWidth" to a number greater than the required single line attribute length, the string does not "word un-wrap".  Below is my awkward code.  Aside from the awkwardness, what am I doing wrong?

 

(defun AttribSetMTextWidthSingleLine (ename Tag /)
(setq elist (entget ename))
(while (/= (cdr (assoc 0 elist)) "SEQEND")
(setq elist (entget (entnext (cdr (assoc -1 elist)))))
(if (= (cdr (assoc 2 elist)) Tag)
(progn
(setq enAtt (cdr (assoc -1 elist))
    objAtt (vlax-ename->vla-object enAtt)
)
(vla-put-MTextBoundaryWidth objAtt 60.0)
(vla-UpdateMTextAttribute objAtt)
) ;progn
) ;if Tag
) ;while
)

0 Likes
Accepted solutions (1)
217 Views
1 Reply
Reply (1)
Message 2 of 2

kerrcad
Contributor
Contributor
Accepted solution

This is resolved.  Setting MTextBoundaryWidth to 0.0 removes word wrapping.  PKENEWELL from The Swamp helped me out.

0 Likes