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

    Create an entirely custom toolbar that loads ruby plugins?

    Scheduled Pinned Locked Moved Developers' Forum
    8 Posts 5 Posters 1.4k Views 5 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.
    • J Offline
      jpjapers
      last edited by

      Hi, Im trying to find out whether its possibvle to make a toolbar that has custom buttons with custom graphics that allow things such as importing as a mesh, loading an existing ruby plugin etc. Is this possible? How would i go about it?

      Thanks

      JP

      1 Reply Last reply Reply Quote 0
      • Chris FullmerC Offline
        Chris Fullmer
        last edited by

        Oh yes, this is definitely possible. What is your programming experience? There are many of us regulars around with all sorts of backgrounds. From those of us who have had no previous programming expernce, to others who are professional developers.

        There is a thread at the top of this forum called "SketchUp-Ruby Resources", or here's a link to it:

        http://forums.sketchucation.com/viewtopic.php?f=180&t=10142

        Check that out, it has some great information in there. Specifically the SketchUp API is really the main thing you will need to invest some time to learning.

        Then if you need more basic getting started help, there is lots of that around here too.

        Chris

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

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

          My tutorial, starting in Chapter 11 teaches the basics of Ruby programming with the SketchUp Ruby API. I don't cover toolbars, however.

          Scarpino's book Automatic SketchUp covers toolbars briefly.

          Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

          1 Reply Last reply Reply Quote 0
          • J Offline
            jpjapers
            last edited by

            Hi, thanks for the reply, ive taken a look at that and im well on my way! along with using existing plugins ive managed to get a bit of my toolbar working πŸ˜„ ive never programmed ruby before but i have programmed in other languages.Thanks for the information.

            I would also like to ask for help on another topic.
            I have an exporter that when it has finished exporting tells me the poly count of a model.
            see attatchment

            I would like to alter this plugin to just show the polycount after all of its calculations and not export the model to a file. Could someone take a look at this plugin and tell me if its possible?

            Thanks

            JP


            Skp to ASE plugin

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

              @jpjapers said:

              I would like to alter this plugin to just show the polycount after all of its calculations and not export the model to a file.

              PolygonMesh.count_polygons can output directly the count of polygons in each of the PolygonMesh objects created with the Face.mesh method.

              You would make a copy of that script and rename it.
              Create a tally variable, ie:
              polytally=0
              Comment out the part the writes the file.
              Edit each part the creates a mesh, and use .count_polygons to add each poly subcount to the tally.
              When the script is done making meshes for all the faces, you'd insert a
              return polytally
              line just before the end

              I'm not here much anymore.

              1 Reply Last reply Reply Quote 0
              • thomthomT Offline
                thomthom
                last edited by

                It would help if you posted the syntax error you get. It includes indication to where in the script you have errors.

                And when you post code snippets, please wrap it [code] tags in order to preserve formatting and ease of reading.

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

                1 Reply Last reply Reply Quote 0
                • J Offline
                  jpjapers
                  last edited by

                  Hi, looking through the script it seems it already has the polymesh.count_polys functionality.
                  I dont mean to be a pain but is there any chance you could take a look at the export script andshow me what i need to do to stop it from exporting and only output a message box with the poly count in it?I know its a big ask and if you cant its fine but it would be a huge help for me.

                  Thanks again

                  JP

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    jpjapers
                    last edited by

                    @thomthom said:

                    It would help if you posted the syntax error you get. It includes indication to where in the script you have errors.

                    And when you post code snippets, please wrap it [code] tags in order to preserve formatting and ease of reading.

                    Hey sorry i edited my post before i saw yours because i found a snippet that i didnt include and i thought it best just to ask someone who knows what theyre doing πŸ˜„

                    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