How to set color for DIMENSION_TEXT
-
Hello everyone!
I created a Layout document by Ruby from SU, and added SU model to it. Then, I added dimension by using the following command:dim = Layout;;LinearDimension.new(start_2d, end_2d, start_offset_length) doc.add_entity(dim, layer, page) dim.connect(start_point, end_point)
However, the background color and the border stroke of the DIMENSION_TEXT are always "red", as you can see in the attached file. It happened after I connect the ConnectionPoints (by using "dim.connect(start_point, end_point)" above.
How can I set the color of the stoke and background to be "white" or none?
Thank you very much for your help.
-
@kimdv said:
Hello everyone!
How can I set the color of the stoke and background to be "white" or none?A
Layout::LinearDimension
object is a subclass ofLayout::Entity
, so it inherits the#style=
setter method.Either create a new
Layout::Style
(or grab it's existing style via the#style
getter,) and modify it. Then set it back upon the dimension object using the#style=
setter. -
In the tree view on the left, select the base dimension style and click Edit. Click the Text tab. In the Text Color list, select a color for the text.
Advertisement