sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    How to set color for DIMENSION_TEXT

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 3 Posters 6.4k Views 3 Watching
    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

      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
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        @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

          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