sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Update | Sketchucation Tools 5.0.8 released with licensing improvements and bugfixes Download

    Where to start?

    Scheduled Pinned Locked Moved Developers' Forum
    44 Posts 4 Posters 3.5k Views 4 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.
    • R
      rumcajs
      last edited by

      If I change code of the plugin, will it be refreshed automatically or must I reload the plugin and how?

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

        @rumcajs said:

        If I change code of the plugin, will it be refreshed automatically or must I reload the plugin and how?

        Reload it manually.

        load 'myfile.rb'

        Though I think Jim created a utility to autoreload after changes where detected. Never used it though as I prefer the manual control.

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

        1 Reply Last reply
        Reply Quote 0
        • R
          rumcajs
          last edited by

          OK. Works. So I tried:

          @iptemp.pick view, x, y
          puts @iptemp
          
          

          #Sketchup::InputPoint:0xd0fe6fc

          So the input point is in hexadecimal format? If I would want to read it, I would need to add method to convert to decimal, right? I tried:
          puts @iptemp.hex
          returns error

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

            No - the hex number you see there is the hexadecimal version of the object id. Ruby convention.

            Refer to the API manual and you find InputPoint.position
            https://developers.google.com/sketchup/docs/ourdoc/inputpoint#position

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

            1 Reply Last reply
            Reply Quote 0
            • R
              rumcajs
              last edited by

              Ah, now it works.

              puts @iptemp.position
              

              Something I miss in the reference manual. From different languages I am used to see above every method a list of similar or related methods/links.... Is here some similar page which gives such kind of information / organized in different way? Or is this the only source?

              1 Reply Last reply
              Reply Quote 0
              • R
                rumcajs
                last edited by

                What does mean $ is it global variable? I thought it is array, but now I see they use it in different way.

                This:

                results = inputbox prompts, values, $exStrings.GetString("Cost Estimate")
                

                What is inputbox, does not look like method of global scope

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

                  @rumcajs said:

                  Is here some similar page which gives such kind of information / organized in different way? Or is this the only source?

                  Each class list all its methods.

                  List of classes:
                  https://developers.google.com/sketchup/docs/classes

                  List of methods:
                  https://developers.google.com/sketchup/docs/methods

                  Object Diagram:
                  https://developers.google.com/sketchup/docs/diagram

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

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

                    @rumcajs said:

                    What does mean $ is it global variable? I thought it is array, but now I see they use it in different way.

                    This:

                    results = inputbox prompts, values, $exStrings.GetString("Cost Estimate")
                    

                    What is inputbox, does not look like method of global scope

                    $ is global variables, yes. Avoid them.

                    inputbox is an alias for UI.inputbox defined in sketchup.rb which comes with SketchUp. (I use UI.inputbox simply because of potential problems of relying on the methods in the global namespace.)

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

                    1 Reply Last reply
                    Reply Quote 0
                    • R
                      rumcajs
                      last edited by

                      Hm. I see. Sketchup.rb is short, so it will not be problem to remember it. And where is definited UI?

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

                        @rumcajs said:

                        And where is definited UI?

                        That's from the API - defined in C++.
                        Look to the documentation: https://developers.google.com/sketchup/docs/ourdoc/ui

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

                        1 Reply Last reply
                        Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • 1
                        • 2
                        • 3
                        • 3 / 3
                        • First post
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement