sketchucation logo sketchucation
    • Login
    ๐Ÿค‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Dimension text

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 3 Posters 759 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.
    • M Offline
      Matt666
      last edited by

      Hi !
      Access to "dimensions" entities informations via scripts seems really hard in Sketchup ... ๐Ÿ˜ž ๐Ÿ˜ž ๐Ÿ˜ž
      How can you access to the dimension text ? Modify it ? Start point of the dimension ? end point ? Line weight ? Arrow ? etc...
      Is it a block ? A group ? Can't explode it...

      Please Help me !!! ๐Ÿ˜ฒ
      Thank you !

      Frenglish at its best !
      My scripts

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        Currently you can't insert or edit dimension entities or their settings with Ruby.

        A script work-around is to insert a component [skp file] that is simply a dimension drawn from the origin say 1 unit long in the x (red), with the text-style/arrow-style preset as required, your script then inserts it at picked-point 1, and then the script rotates/scales it in its length etc to suit picked-point 2 etc. The dimension shown updates accordingly.

        .

        TIG

        1 Reply Last reply Reply Quote 0
        • M Offline
          Matt666
          last edited by

          @unknownuser said:

          Currently you can't insert or edit dimension entities or their settings with Ruby.

          ๐Ÿ˜ž ๐Ÿ˜ž ๐Ÿ˜ฎ ๐Ÿ˜ฎ ๐Ÿ˜ข ๐Ÿ˜ข ๐Ÿคข
          Grmbl... Is it a v7 upgrade???

          @unknownuser said:

          A script work-around is to insert a component [skp file] that is simply a dimension drawn from the origin say 1 unit long in the x (red), with the text-style/arrow-style preset as required, your script then inserts it at picked-point 1, and then the script rotates/scales it in its length etc to suit picked-point 2 etc. The dimension shown updates accordingly.

          Thanks for the method !
          I want to make a script that erase all units in texts... Verz easy in lisp language, but not in ruby....

          Thank you TIG !

          Frenglish at its best !
          My scripts

          1 Reply Last reply Reply Quote 0
          • Dave RD Offline
            Dave R
            last edited by

            @matt666 said:

            I want to make a script that erase all units in texts...

            Why not just uncheck the box in Window>Model Info>Units?

            Etaoin Shrdlu

            %

            (THERE'S NO PLACE LIKE)

            G28 X0.0 Y0.0 Z0.0

            M30

            %

            1 Reply Last reply Reply Quote 0
            • M Offline
              Matt666
              last edited by

              ๐Ÿ˜„ ๐Ÿ˜„
              Thank you ! I also wanted to make a script that removed unnecessary zeros (if the dimension result is an integer...)
              225.00 => 225
              225.20 => 225.2
              225.25 => 225.25
              But I think now it's not possible.
              Thank you Dave !

              Frenglish at its best !
              My scripts

              1 Reply Last reply Reply Quote 0
              • Dave RD Offline
                Dave R
                last edited by

                I no little of Ruby but you are probably right. Dropping the zeroes as needed may not be possible. Perhaps that should be a wish list item for the next version of SU.

                Cheers,

                Dave

                Etaoin Shrdlu

                %

                (THERE'S NO PLACE LIKE)

                G28 X0.0 Y0.0 Z0.0

                M30

                %

                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