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

    New API doc - typos and questions

    Scheduled Pinned Locked Moved Developers' Forum
    370 Posts 35 Posters 355.4k Views 35 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
      thomthom
      last edited by

      Seems that InstanceObserver.onClose is dead as well. http://code.google.com/apis/sketchup/docs/ourdoc/instanceobserver.html#onClose
      But onOpen works.

      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

        Error 404 (Not Found)!!1

        favicon

        (code.google.com)

        @unknownuser said:

        For example, if a user has double-clicked into a component to edit its geometry, and then double clicked into a sub-group to edit that, the active_path might contain:

        And there it stops. Doesn't actually display an example.

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

        1 Reply Last reply
        Reply Quote 0
        • scottliningerS
          scottlininger
          last edited by

          Self note: We should add these codes to the send_action docs:

          Error 404 (Not Found)!!1

          favicon

          (groups.google.com)

          • Scott Lininger
            SketchUp Software Engineer
            Have you visited the Ruby API Docs?
          1 Reply Last reply
          Reply Quote 0
          • thomthomT
            thomthom
            last edited by

            Error 404 (Not Found)!!1

            favicon

            (code.google.com)

            
                 # This is an example of an observer that watches tool interactions.
                 class MyToolsObserver < Sketchup;;ShadowInfoObserver
                   def onActiveToolChanged(tools, tool_name, tool_id)
                     UI.messagebox("onActiveToolChanged; " + tool_name.to_s)
                   end
                 end
            
                 # Attach the observer.
                 Sketchup.active_model.tools.add_observer(MyToolsObserver.new)
            
            

            Note that it refers to Sketchup::ShadowInfoObserver instead of Sketchup::ToolsObserver.

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

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

              @unknownuser said:

              Self note: We should add these codes to the send_action docs:

              Error 404 (Not Found)!!1

              favicon

              (groups.google.com)

              Does this list work 'across-platforms' - my understanding was that PCs and Macs differ ?

              If there are such codes it makes like a lot easier...

              Some "wrong": Sketchup.send_action 21513 >>> opens the Outliner ???
              .

              TIG

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

                Error 404 (Not Found)!!1

                favicon

                (code.google.com)

                The manual says the argument should be either true or false, but the example sets it to 3.

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

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

                  The FAQ page lists some sites that carry/catalog ruby scripts. the Sketchucation extensions index (thanks to Jim!) would also be a great resource to add to that list now

                  extensions url:

                  404 Not Found

                  favicon

                  (www.sketchucation.com)

                  Chris

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

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

                    http://code.google.com/apis/sketchup/docs/ourdoc/toolsobserver.html
                    It'd be nice if the ToolsObserver listed the full list of tools IDs.

                    I've begun a list here which associates constants to the IDs for convenient use in scripts: http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=18124

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

                    1 Reply Last reply
                    Reply Quote 0
                    • J
                      Jim
                      last edited by

                      @thomthom said:

                      http://code.google.com/apis/sketchup/docs/ourdoc/toolsobserver.html
                      It'd be nice if the ToolsObserver listed the full list of tools IDs.

                      I've begun a list here which associates constants to the IDs for convenient use in scripts: http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=18124

                      In the back of my mind I have the idea the the tool id's were not reliable and shouldn't be used; but I can't remember why.

                      Hi

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

                        @jim said:

                        @thomthom said:

                        http://code.google.com/apis/sketchup/docs/ourdoc/toolsobserver.html
                        It'd be nice if the ToolsObserver listed the full list of tools IDs.

                        I've begun a list here which associates constants to the IDs for convenient use in scripts: http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=18124

                        In the back of my mind I have the idea the the tool id's were not reliable and shouldn't be used; but I can't remember why.

                        I thought is was the tool names as on Mac the first four characters where truncated? No?

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

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

                          Error 404 (Not Found)!!1

                          favicon

                          (code.google.com)

                          The ComponentInstance.definition example does not include the method in the example anywhere, so by definition it is not really an example.

                          This is the given example:

                           point = Geom;;Point3d.new 10,20,30
                           transform = Geom;;Transformation.new point
                           model = Sketchup.active_model
                           entities = model.active_entities
                           path=Sketchup.find_support_file "Bed.skp",
                             "Components/Components Sampler/"
                          

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

                          1 Reply Last reply
                          Reply Quote 0
                          • J
                            Jim
                            last edited by

                            Any ideas about a way to mark these errors as they are fixed?

                            Hi

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

                              We could ask Coen to have a strike-through BBC tag. [deleted] or something...
                              Or, put a big fat FIXED in bold green. Might be easier.

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

                              1 Reply Last reply
                              Reply Quote 0
                              • A
                                avariant
                                last edited by

                                From Image.explode:

                                entitiesarray     an Array object of entities if successful
                                

                                which I interpret as the face and edges created in the explosion. However, the result from my testing always returns an empty array.

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

                                  I see that behaviour as well: http://www.sketchucation.com/forums/scf/viewtopic.php?f=11&t=17150&hilit=+explode

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

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

                                    Error 404 (Not Found)!!1

                                    favicon

                                    (code.google.com)

                                    add polygon detail just repeats the add_point example.

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

                                    1 Reply Last reply
                                    Reply Quote 0
                                    • scottliningerS
                                      scottlininger
                                      last edited by

                                      @thomthom said:

                                      Seems that InstanceObserver.onClose is dead as well. http://code.google.com/apis/sketchup/docs/ourdoc/instanceobserver.html#onClose
                                      But onOpen works.

                                      Thomas,

                                      I'm about to push an update with all of the recent changes above. This one puzzled me, though. The ToolsObserver examples work fine for me on the onOpen and onClose. Can you clarify what "dead as well" means? 😄

                                      @unknownuser said:

                                      Does this list work 'across-platforms' - my understanding was that PCs and Macs differ ?

                                      Tig, these action codes only work on the PC, but I still think I'll add them to the docs. There are some cool things in there that PC-only shops might need.

                                      Thanks, guys! New update should be live in the next day or so.

                                      • Scott Lininger
                                        SketchUp Software Engineer
                                        Have you visited the Ruby API Docs?
                                      1 Reply Last reply
                                      Reply Quote 0
                                      • scottliningerS
                                        scottlininger
                                        last edited by

                                        @thomthom said:

                                        We could ask Coen to have a strike-through BBC tag. [deleted] or something...
                                        Or, put a big fat FIXED in bold green. Might be easier.

                                        Jim, is there a way that I could be granted edit rights just to this thread? Then I could add a FIXED note inside the reports as I correct them?

                                        • Scott Lininger
                                          SketchUp Software Engineer
                                          Have you visited the Ruby API Docs?
                                        1 Reply Last reply
                                        Reply Quote 0
                                        • thomthomT
                                          thomthom
                                          last edited by

                                          @unknownuser said:

                                          I'm about to push an update with all of the recent changes above. This one puzzled me, though. The ToolsObserver examples work fine for me on the onOpen and onClose. Can you clarify what "dead as well" means? 😄

                                          Dead as in: I never see it trigger.

                                          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

                                            ToolObservers? How are they related to onClose and onOpen?

                                            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
                                            • 15
                                            • 16
                                            • 17
                                            • 18
                                            • 19
                                            • 17 / 19
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement