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

    Towards a complete extension: Good Practices

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 3 Posters 539 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.
    • hsmyersH Offline
      hsmyers
      last edited by

      I have with the aid of snippets and Alexander C. Schreyer's Ruby Code Editor πŸ˜„ stumbled my way to a example that does what I wish. Its of the form:

      
      #
      # bbtools.rb script to add tools for bounding box manipulation
      #
      
      module HSM
        module BBTools
          class BBTool
      
      .
      .
      .
      vital essence
      .
      .
      .
          end # class BBTool
        end # module BBTools
      end # module HSM
      
      

      and while in the editor I invoke it with:

      
      tool = HSM;;BBTools;;BBTool.new()
      tool.runTool()
      
      

      At this point I'd like to make it a 'real' extension. By that I mean add it to one of the pull down menus in SU. I believe I need to do this in a separate file where I essentially tell SU about my tool and where I will place it.

      there is also the matter of:

      
      Extension Wrappers; All extensions in the Extension Warehouse must be wrapped
      with a SketchupExtension class so that the user can enable and disable the
      extension from the Preferences dialog and/or the Extension Warehouse UI.
      
      

      At this point I admit to being clueless about how to accomplish this last step. My goal is to at some point publish and I believe that adds a layer of complexity as well.

      Advice? Suggestions. Brickbats? Catcalls? Bring it on---Please 😎 !!

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

        Get some others recent Extensions to see how it's done by them...
        e.g. some of my recent ones like "LayerWatcher"...

        TIG

        1 Reply Last reply Reply Quote 0
        • hsmyersH Offline
          hsmyers
          last edited by

          @tig said:

          Get some others recent Extensions to see how it's done by them...
          e.g. some of my recent ones like "LayerWatcher"...

          Cool!! I will πŸ˜„

          1 Reply Last reply Reply Quote 0
          • Dan RathbunD Offline
            Dan Rathbun
            last edited by

            @hsmyers said:

            My goal is to at some point publish and I believe that adds a layer of complexity as well.

            Then you'll need to follow:
            http://extensions.sketchup.com/en/developer_center/ew_developer#rbz

            I'm not here much anymore.

            1 Reply Last reply Reply Quote 0
            • hsmyersH Offline
              hsmyers
              last edited by

              @dan rathbun said:

              Then you'll need to follow:
              http://extensions.sketchup.com/en/developer_center/ew_developer#rbz

              I've read through same and I plan to do so again more thoroughly again after I get this next layer of magic nailed down. I think I now understand the two file format well enough to give it a spin in a bit but am momentarily busy prepping prototype parts for shapeways. Its been tool, prototype, tool, proto in a kind of recursive spiral! Need one for the other and round about we go...

              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