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

New API doc - typos and questions

Scheduled Pinned Locked Moved Developers' Forum
370 Posts 35 Posters 256.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.
  • S Offline
    scottlininger
    last edited by 31 Mar 2009, 17:58

    I also just got this one from a coworker:

    Sketchup.get_resource_path example fails. Looks like there's a required parameter that's not properly documented.

    -Scott

    • Scott Lininger
      SketchUp Software Engineer
      Have you visited the Ruby API Docs?
    1 Reply Last reply Reply Quote 0
    • T Offline
      thomthom
      last edited by 31 Mar 2009, 18:06

      These failing observers is quite severe. I don't suppose there's a chance the dev team can push out an update outside the servicepack schedule? (I don't know what your schedule is, but seeing that we just got an servicepack I'm a bit pessimistic to when this might be addressed...)

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

      1 Reply Last reply Reply Quote 0
      • R Offline
        remus
        last edited by 31 Mar 2009, 18:56

        A semi related typo:

        in this tutorial pt4=[0,9,9] whereas it should be [0,9,0].

        http://remusrendering.wordpress.com/

        1 Reply Last reply Reply Quote 0
        • C Offline
          Chris Fullmer
          last edited by 31 Mar 2009, 19:03

          ::OFF TOPIC::
          All right Remus, come clean. Your always in the Ruby forum, you spotted a typo in tutorial, you answer questions once in a while....how much ruby do you know? Are you making plugins and selling them overseas for big money or something?

          Chris

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

          1 Reply Last reply Reply Quote 0
          • S Offline
            scottlininger
            last edited by 31 Mar 2009, 19:06

            Just saw another one: the Sketchup.break_edges= example is the Sketchup.break_edges? example.

            Thom, step 1 with the observers is to confirm if it's the implementation that is broken or the documentation. Simone has filed A-list bugs against the observer problems you've found, and he and I have been chatting about it. Any fixes will have to wait until the next maintenance release.

            Feel free to PM me if you want to brainstorm workarounds for what you're trying to accomplish. I know a few tricks. πŸ˜‰

            • Scott Lininger
              SketchUp Software Engineer
              Have you visited the Ruby API Docs?
            1 Reply Last reply Reply Quote 0
            • R Offline
              remus
              last edited by 31 Mar 2009, 19:09

              Dont pretend your not in on it as well πŸ˜„

              on a more serious note, it seems a shame to miss out on the ever so powerful ruby based capabilities of sketchup, so i thought i'd try my hand at it and see if i got anywhere.

              I reckon i could just about right a box making script at the moment πŸ‘ just as long as you dont want to change your box at all...

              http://remusrendering.wordpress.com/

              1 Reply Last reply Reply Quote 0
              • T Offline
                thomthom
                last edited by 31 Mar 2009, 19:44

                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
                • T Offline
                  thomthom
                  last edited by 1 Apr 2009, 12:42

                  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
                  • S Offline
                    scottlininger
                    last edited by 1 Apr 2009, 15:00

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

                    http://groups.google.com/group/Ruby-API/msg/e30ee3f2b21cb228

                    • Scott Lininger
                      SketchUp Software Engineer
                      Have you visited the Ruby API Docs?
                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      thomthom
                      last edited by 1 Apr 2009, 17:37

                      http://code.google.com/apis/sketchup/docs/ourdoc/toolsobserver.html

                      
                           # 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
                      • T Offline
                        TIG Moderator
                        last edited by 2 Apr 2009, 08:23

                        @unknownuser said:

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

                        http://groups.google.com/group/Ruby-API/msg/e30ee3f2b21cb228

                        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
                        • T Offline
                          thomthom
                          last edited by 3 Apr 2009, 09:19

                          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
                          • C Offline
                            Chris Fullmer
                            last edited by 3 Apr 2009, 18:50

                            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:

                            410 Gone

                            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
                            • T Offline
                              thomthom
                              last edited by 4 Apr 2009, 18:15

                              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 Offline
                                Jim
                                last edited by 4 Apr 2009, 18:55

                                @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
                                • T Offline
                                  thomthom
                                  last edited by 4 Apr 2009, 19:36

                                  @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
                                  • C Offline
                                    Chris Fullmer
                                    last edited by 10 Apr 2009, 00:16

                                    http://code.google.com/apis/sketchup/docs/ourdoc/componentinstance.html#definition

                                    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 Offline
                                      Jim
                                      last edited by 10 Apr 2009, 20:27

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

                                      Hi

                                      1 Reply Last reply Reply Quote 0
                                      • T Offline
                                        thomthom
                                        last edited by 11 Apr 2009, 10:19

                                        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 Offline
                                          avariant
                                          last edited by 13 Apr 2009, 14:46

                                          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
                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 5
                                          • 18
                                          • 19
                                          • 3 / 19
                                          3 / 19
                                          • First post
                                            53/370
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement