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

    [Plugin] 2D Tools

    Scheduled Pinned Locked Moved Plugins
    785 Posts 178 Posters 462.6k Views 177 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.
    • S Offline
      skulizhnikova
      last edited by

      Hello!
      Is there any way to get public Api of 2d Tool? I want to use it for adding 2d text vie script

      Thanks,
      Svetlana

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

        There is no API.
        It is 'all rights reserved ©'.
        However you can read the individual RB files in the 2Dtools subfolder to see how they work and 'borrow' parts of their code for use in your own RB file...
        If you simply want to 'call' the 2dTextTool from your own script look at the 2D#loader.rb file to see what it loads...
        Around line #119 it creates the command for "2D Text". It uses the command:
        Sketchup.active_model.select_tool TextTool2D.new
        Which will fail when replicated outside of the main module !
        You need to use something like:
        Sketchup.active_model.select_tool(Tools2D::TextTool2D.new)

        If you want to use just a part of what it does you'll need to delve into the actual 2DtextTool.rb in the subfolder... there you can see how the user can input values in the dialog, make the component to suit and place it...

        TIG

        1 Reply Last reply Reply Quote 0
        • S Offline
          skulizhnikova
          last edited by

          Thank you!

          1 Reply Last reply Reply Quote 0
          • E Offline
            errror404
            last edited by

            Hi TIG, i tried using the plugin (sketchup 2017), but I couldn't find any way to change the scale of the line style (only the width). I try making a custom one (which would solve my problem), but the dialog box to make the custom styles doesn't show up when I select it.

            Thanks

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

              You can change the styled-line's width, but you must make a new style for you self - e.g. you want the dashes to be longer and more gaps...

              TIG

              1 Reply Last reply Reply Quote 0
              • E Offline
                errror404
                last edited by

                @tig said:

                You can change the styled-line's width, but you must make a new style for you self - e.g. you want the dashes to be longer and more gaps...

                Thanks... sometimes the dialog for the Custom Style doesn't come up.

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

                  You need to right-click in open space - if there's something below the cursor the dialog won't open, as the context-menu takes preference.

                  PS:
                  I just tested it in the latest version of 2020 and I see the issue !
                  Earlier versions should be OK...
                  Because the latest update adds the ability to invert a selection and make an empty group/component that 'steals' the focus for the custom dialog.
                  I'll look at circumventing it...

                  TIG

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

                    Here's v7.7
                    https://sketchucation.com/pluginstore?pln=2Dtools
                    It has been adjusted to sidestep some v2020 issues re context-menus & right-click.
                    The LineStyle and Hatching dialogs will now open with a TAB-key tap in all versions...

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • E Offline
                      errror404
                      last edited by

                      @tig said:

                      Here's v7.7
                      It has been adjusted to sidestep some v2020 issues re context-menus & right-click.
                      The LineStyle and Hatching dialogs will now open with a TAB-key tap in all versions...

                      Thanks!! the glitch is gone 😎

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

                        Hi,

                        Line and Text tools work well in 2D Tools v7.7 plugin. The other tools make Sketchup "not responding" and freeze it. Need "Force Quit" and restart Sketchup. Help do nothing when clicking on it. Ruby console remain empty with the none working tools.

                        Mac OS
                        Catalina 10.15.6

                        Sketchup PRO
                        20.2.171

                        Thanks,
                        Robert

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

                          Please explain exactly the steps you take - with which tool[s] - to get this issue...

                          TIG

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

                            1- Open a new file in cm
                            2- Set the view to "Iso"
                            3- Pick the "Rectangle Icon" in the floating menu bar
                            4- Click a first point at the origin
                            5- Drag on the green axis
                            6- Click again on the second point
                            7- Sketchup freeze

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

                              I just repeated your listed steps exactly, and the Rectangle tool worked perfectly for me.
                              Have you reset the axes - they should be the default set up - ?
                              What is your Z-plane set to ?
                              When you say 'drag' are you holding the mouse button down ?
                              Each of the 3 points should be picked with a click... the 3rd point also accepts a typed in size + enter
                              What are your Model > Units settings - e.g. ensure snapping is off ??

                              TIG

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

                                In the Template I made, axis have not been change by me... I assume the are the default one. To be sure, I also tried to draw a rectangle with a standard Template from Sketchup; it also freezed.

                                Z plane is set to zero cm.

                                I did not hold down the mouse button when I drag to the second point.

                                I can pick the first point... but when I clic on the second one, Sketchup freeze and I need Force Quit.

                                In the Template I use, Snapping is on. I also tried with snapping off...Sketchup also freezed.

                                I worked with a Wacom Pen on tablet. I repeat the same steps with a Mac mouse. Same problems occur.

                                Please see attached images


                                Screen Shot 2020-09-20 at 8.45.01 AM.png


                                Screen Shot 2020-09-20 at 8.46.21 AM.png


                                Screen Shot 2020-09-20 at 8.47.42 AM.png


                                Screen Shot 2020-09-20 at 8.48.16 AM.png

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

                                  If you try to draw the rectangle, but this time pick a random start-point, that is not at the origin [i.e. off-axis], is it any better ?
                                  I wouldn't expect it to be, but sometimes who knows ??

                                  What's your SketchUp version ref ?

                                  TIG

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

                                    I tried to draw a rectangle at a random-point and Sketchup freeze after clicking at the second point.

                                    My Sketchup version is : Pro 20.2.171

                                    Mac Os : 10.15.6

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

                                      Since I can't replicate this with the same set up on a PC... are there any MAC users out there who can test this ?
                                      If I get some more useful feedback we might progress with a solution...

                                      TIG

                                      1 Reply Last reply Reply Quote 0
                                      • G Offline
                                        gbing
                                        last edited by

                                        @tig said:

                                        Since I can't replicate this with the same set up on a PC... are there any MAC users out there who can test this ?
                                        If I get some more useful feedback we might progress with a solution...

                                        Hello TIG: same problem in my MAC too for 2D tools "rectangle"

                                        • Sketchup pro 2020 Version 20.2.171
                                        • MAC OS Mojave V. 10.14.6
                                          For testing purpose I have disabled all plugins except 2Dtool (Version Updated: 2020/05/21) and deBabelizer

                                        The plugin works fine in Sketchup pro 2020 Version 19.3.252.

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

                                          @gbing said:

                                          The plugin works fine in Sketchup pro 2020 Version 19.3.252.

                                          Do you mean in SketchUp 2019?

                                          Etaoin Shrdlu

                                          %

                                          (THERE'S NO PLACE LIKE)

                                          G28 X0.0 Y0.0 Z0.0

                                          M30

                                          %

                                          1 Reply Last reply Reply Quote 0
                                          • G Offline
                                            gbing
                                            last edited by

                                            @dave r said:

                                            @gbing said:

                                            The plugin works fine in Sketchup pro 2020 Version 19.3.252.

                                            Do you mean in SketchUp 2019?

                                            Oh yes, sorry.
                                            ... "Sketchup pro 2019 Version 19.3.252"

                                            Thank you Dave

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 35
                                            • 36
                                            • 37
                                            • 38
                                            • 39
                                            • 40
                                            • 37 / 40
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement