How to change DBtext style by the StyleName

How to change DBtext style by the StyleName

Anonymous
Not applicable
987 Views
2 Replies
Message 1 of 3

How to change DBtext style by the StyleName

Anonymous
Not applicable

I think I need to get a textStyleId at first, but how to return a textStyleID by the textStyleName. Because textStyleName property is read-only and it can not be assigned.

 

For example: I just want to change a DBtext style to STD70, this is a new Style create by me.

 

Thanks for any help very

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

_gile
Consultant
Consultant
Accepted solution

Hi,

 

You can get the TextStyleId using the the TextStyleName from the TextStyleTable

 

if (textStyleTable.Has("STD70"))
{
    text.TextStyleId = tst["STD70"];
}

 



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thank you very much

0 Likes