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

    [Plugin] Set Arc and Circle Defaults

    Scheduled Pinned Locked Moved Plugins
    24 Posts 12 Posters 27.5k Views 12 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.
    • thomthomT Offline
      thomthom
      last edited by

      Might be good to try to reach out to the developer and see if he'd be willing to open source it and put it out on GitHub. IMO that would be better than rewriting from scratch.

      Thomas Thomassen β€” SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • D Offline
        driven
        last edited by

        does this work in v14 and above?

        I don't use PC's but I'm looking for code that does something similar to this...

        require 'win32ole'
        val =  48
        
        circle_first = UI.start_timer(1.0, true) do
        	if Sketchup.active_model.tools.active_tool_name != 'CircleTool'
        		Sketchup.send_action('selectCircleTool;')
        	else # run the script
        		WIN32OLE;;new('WScript.Shell').SendKeys("#{val}{ENTER}")
        		p "#{val}{ENTER}" 
        		UI.stop_timer(circle_first)  
        		arc_next = UI.start_timer(1.0, true) do
        			if Sketchup.active_model.tools.active_tool_name != 'ArcTool'
        				Sketchup.send_action('selectArcTool;')
        			else # run the script
        				WIN32OLE;;new('WScript.Shell').SendKeys("#{val/2}{ENTER}") 
        				p "#{val/2}{ENTER}"
        				UI.stop_timer(arc_next)
        			end 
        		end 
        	end 
        end
        

        john

        learn from the mistakes of others, you may not live long enough to make them all yourself...

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

          Here is a v8...v2016 beta RBZ... of "TIG-CircleArcDefaulter"
          It uses different methods across the various SketchUp versions...
          Note that it's for Windows only...

          I think it works OK... πŸ˜•

          The defaults.txt file contains the default [new] segment counts for circles and arcs [its shipped values are 48 and 24 respectively].

          These are used to reset those defaults as SketchUp starts...

          The Plugins/Extensions menu contains a new TIG-CircleArcDefaulter submenu...

          Its items let you:

          1. Edit the defaults.txt file to set new defaults [which are then reused thereafter].
          2. Reset the defaults to the two values currently saved in the defaults.txt file [run this after saving your edit]...

          If there is positive feedback I'll publish it as a new Extension in the PluginStore...


          TIG-CircleArcDefaulter_v1.0.rbz

          TIG

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

            Here's an update on my recent beta RBZ...
            v2.0 of "TIG-CircleArcDefaulter"
            It works on v8...v2016 and it now works on both PC and MAC πŸ€“
            It uses different methods across the various SketchUp versions and OS...

            As with the original PC only version...

            The defaults.txt file contains the default [new] segment counts for circles and arcs [its shipped values are 48 and 24 respectively].

            These are used to reset those defaults as SketchUp starts...

            The Plugins/Extensions menu contains a new "TIG-CircleArcDefaulter" submenu...

            Its items let you:

            1. Edit the defaults.txt file to set new defaults [which are then reused thereafter].
            2. Reset the defaults to the two values currently saved in the defaults.txt file [run this after saving your edit]...

            If there is enough positive feedback I'll publish it as a new Extension in the PluginStore...

            PS: I did a post a while back about 'versines' and how to consider faceting in 3d-printing etc...
            http://sketchucation.com/forums/viewtopic.php?p=577465#p577465
            These simple snippets [" & mm] were written to let you input the radius, versine-tolerance [typically 1/1000"] and a swept-arc - and get back a corresponding segmentation suggested for the arc - since smaller radii are different from bigger objects etc...

            PPS: As you know, @driven is a MAC guru, and he has pointed out in a PM that users with the latest OSX [my test MAC is one OSX behind!] might have Apple trying to protect them from the sort of operations need to circumvent SketchUp's segment-defaulting as it starts up... If you do get error messages and have some system knowledge you can probably set it to be allowed, alternatively let us know because @driven probably has a work around, but that does involve using a 3rd party app that'd need shipping for MAC uses...


            TIG-CircleArcDefaulter_v2.0.rbz

            TIG

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

              Here's an update on my recent beta RBZ...
              v3.0 of "TIG-CircleArcDefaulter"
              It works on v8...v2016 and it now works on both PC and MAC πŸ€“
              It uses different methods across the various SketchUp versions and OS...

              It now has a trap [thanks to @driven] to ensure that the SketchUp viewport is foremost as the 'reset' is done...


              As with the previous version...

              The defaults.txt file contains the default [new] segment counts for circles and arcs [its shipped values are 48 and 24 respectively].

              These are used to reset those defaults as SketchUp starts...

              The Plugins/Extensions menu contains a new "TIG-CircleArcDefaulter" submenu...

              Its items let you:

              1. Edit: the "defaults.txt" file to set new defaults [which are then reused thereafter].
              2. Reset: the defaults to the two values currently saved in the "defaults.txt" file [run this after saving your edit]...

              If there is enough positive feedback I'll publish it as a new Extension in the PluginStore...


              I'll repeat the PSs [modifed]...


              PS: I did a post a while back about 'versines' and how to consider faceting in 3d-printing etc...
              viewtopic.php?p=577465#p577465
              These simple snippets [" & mm] were written to let you input the radius, versine-tolerance [typically 1/1000"] and a swept-arc - and get back a corresponding segmentation suggested for the arc - since smaller radii are different from bigger objects etc...


              PPS: @driven, the MAC guru, has pointed out that users of the latest OSX might have their Apple trying to protect them from the sort of operations need to circumvent SketchUp's segment-defaulting as it starts up...
              If it does this, then please follow this guidance to allow SketchUp.app access to your computer...
              https://support.apple.com/kb/PH21504?locale=en_US



              TIG-CircleArcDefaulter_v3.0.rbz

              TIG

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

                Here's an update on my recent beta RBZ...
                v4.0 of "TIG-CircleArcDefaulter"
                It works on v8...v2016 and it now works on both PC and MAC πŸ€“
                It uses different methods across the various SketchUp versions and OSs...

                It now has a MAC trap [using 'cliclick' - thanks to @driven] to ensure that your OSX doesn't try and stop its system-level resetting.


                As with the previous version...

                The defaults.txt file contains the default [new] segment counts for circles and arcs [its shipped values are 48 and 24 respectively].

                These are used to reset those defaults as SketchUp starts...

                The Plugins/Extensions menu contains a new "TIG-CircleArcDefaulter" submenu...

                Its items let you:

                1. Edit: the "defaults.txt" file to set new defaults [which are then reused thereafter].
                2. Reset: the defaults to the two values currently saved in the "defaults.txt" file [run this after saving your edit]...

                If there is enough positive feedback I'll publish it as a new Extension in the PluginStore...


                I'll repeat the various earlier PSs [modifed]...


                PS: I did a post a while back about 'versines' and how to consider faceting in 3d-printing etc...
                viewtopic.php?p=577465#p577465
                These simple snippets [" & mm] were written to let you input the radius, versine-tolerance [typically 1/1000"] and a swept-arc - and get back a corresponding segmentation suggested for the arc - since smaller radii are different from bigger objects etc...


                PPS: @driven, our bestest MAC guru, has pointed out that users of the latest OSX might have their Apple trying to protect them from the sort of operations need to circumvent SketchUp's segment-defaulting as it starts up...
                This version should circumvent this, if it does not please let us know, in the meanwhile see this...
                https://support.apple.com/kb/PH21504?locale=en_US



                TIG-CircleArcDefaulter_v4.0.rbz

                TIG

                1 Reply Last reply Reply Quote 0
                • Bob JamesB Offline
                  Bob James
                  last edited by

                  @tig said:

                  If there is enough positive feedback I'll publish it as a new Extension in the PluginStore...

                  My vote: πŸ‘

                  i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

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

                    Here's another update of my recent beta RBZ files...
                    v5.0 of "TIG-CircleArcDefaulter"

                    If sidesteps a possible MAC-only issue - which could arise if someone else were using the same app in their own Extension's code.
                    But now it's been properly separated...

                    See the previous posts about its usage etc, which remains the same...


                    TIG-CircleArcDefaulter_v5.0.rbz

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      aboammar
                      last edited by

                      @tig said:

                      Here's another update of my recent beta RBZ files...
                      v5.0 of "TIG-CircleArcDefaulter"

                      If sidesteps a possible MAC-only issue - which could arise if someone else were using the same app in their own Extension's code.
                      But now it's been properly separated...

                      See the previous posts about its usage etc, which remains the same...

                      I just tried your extension (TIG-CircleArcDefaulter_v5.0.rbz) on SkecthUp Pro 2021 and it is working great. The only thing that is not working in the extension is the Reset Default function. Maybe you can fix this in an update.

                      Anyway, thank you so much for this extension. But why it is not available in the Extension Whitehouse?

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

                        You might notice that this free extension is ~10 years old, and it hasn't been changed for >5yrs, so any updates are very unlikely...

                        Note that none of my plugins are hosted on the EWH - and like Fredo - I prefer to use the somewhat earlier original repository - SketchUcation's PluginStore - which offers advantages to developers, and which has many additional tools unavailable through the EWH...

                        TIG

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

                        Advertisement