• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

How to set color for DIMENSION_TEXT

Scheduled Pinned Locked Moved Developers' Forum
3 Posts 3 Posters 6.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    kimdv
    last edited by 26 Jun 2021, 08:49

    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.

    https://i.ibb.co/Q9tv2Dm/test1.png

    How can I set the color of the stoke and background to be "white" or none?
    Thank you very much for your help.


    test1.layout

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dan Rathbun
      last edited by 14 Jul 2021, 18:38

      @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 of Layout::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.

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • S Offline
        streamlinemyrei Newcomers
        last edited by 11 Oct 2022, 09:54

        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.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement