Get TextNote color

Get TextNote color

esatis
Advocate Advocate
438 Views
1 Reply
Message 1 of 2

Get TextNote color

esatis
Advocate
Advocate

Hi, 

I want to get text note type color,

but for some strange reason both of these this returns null:

element.get_Parameter(BuiltInParameter.TEXT_COLOR).AsValueString();
element.get_Parameter(BuiltInParameter.LINE_COLOR).AsValueString();

 What could be the problem?

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

RPTHOMAS108
Mentor
Mentor
Accepted solution

The storage type of the parameter LINE_COLOR is integer so you should use Parameter.AsInteger. In RevitLookup LINE_COLOR on the TextNoteType seems to define the colour these days.

 

You then need to convert the integer to RGB.

 

The Building Coder: Changing Text Colour (typepad.com)