Method 'TextWidth' of object 'IAcadMLeader' failed

Method 'TextWidth' of object 'IAcadMLeader' failed

jeremye86
Advocate Advocate
333 Views
1 Reply
Message 1 of 2

Method 'TextWidth' of object 'IAcadMLeader' failed

jeremye86
Advocate
Advocate

why am i getting an error when adding text to an mleader.  This was working for me before but now its is not, I'm not sure what changed.

 

code is below.  fails at oML.TextString = "test"

 

Dim oML As AcadMLeader

mleaderpoints(0) = 996.9788: mleaderpoints(1) = -683.8893: mleaderpoints(2) = 0
mleaderpoints(3) = 1055.7743: mleaderpoints(4) = -609.7153: mleaderpoints(5) = 0
Set oML = acaddoc.ModelSpace.AddMLeader(mleaderpoints, 0)
oML.TextString = "test"

 

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

jeremye86
Advocate
Advocate
Accepted solution

i figured it out.  I just had to change the default mleaderstyle.   It was set to a style that did not have text.

0 Likes