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::LinearDimensionobject 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#stylegetter,) 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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better đź’—
Register LoginAdvertisement