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

    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.
    • thomthomT Offline
      thomthom
      last edited by

      Camera.set
      http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/camera.html#set

      
      The initialize method is deprecated. It essentially does the same thing as Camera.set.
      
      

      Seems that's the description for Camera.new http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/camera.html#new
      ...and that Camera.new has the description for Camera.set

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

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

        View.pickray
        http://code.google.com/apis/sketchup/docs/ourdoc/view.html#pickray

        @unknownuser said:

        Returns:
        ray
        a ray

        "a ray"? Without testing this I#m guessing either a vector or line.

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

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

          @thomthom said:

          View.pickray
          http://code.google.com/apis/sketchup/docs/ourdoc/view.html#pickray

          @unknownuser said:

          Returns:
          ray a ray

          "a ray"? Without testing this I#m guessing either a vector or line.

          see this...

          @unknownuser said:

          Model.raytest
          A ray is a two element array containing a point and a vector [Geom::Point3d(), Geom::Vector3d()]. http://code.google.com/apis/sketchup/docs/ourdoc/model.html#raytest
          _

          I'm not here much anymore.

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

            Yea - I tested it later that day. It's what the Geom module describes as a line.

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

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

              @thomthom said:

              Yea - I tested it later that day. It's what the Geom module describes as a line.

              Shouldn't the API have a definition for Line and/or Ray as a class (under the Geom module) ?

              something like:

              
              class Geom;;Ray < Array
                def new(*args)
                  Array[Geom;;Point3d().new, Geom;;Vector3d().new]
                  super()
                end
              end
              
              

              I'm not here much anymore.

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

                Line and Plane? hm... maybe... thought of that myself. but never really felt the need for it to make a request. works fine as it is.

                Dealing with them as Arrays works ok. They are simple structures.

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

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

                  Model.add_note

                  The note is not displayed unless there are entities in the model. If you add a note first thing in a new model, it is invisible but .visible? on the note object still returns true.

                  As soon as you draw something, the note appears.

                  I'm not here much anymore.

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

                    Thanks Dan - yet more never-seen-before docs coming to light.

                    Hi

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

                      I have the mental image of Scott drowning in printouts from this thread... 😒 😆

                      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

                        Oh, I think there is a completely undocumented UTM class in there somewhere under Geom.

                        Hi

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

                          @jim said:

                          Oh, I think there is a completely undocumented UTM class in there somewhere under Geom.

                          hm.. all I can find out about that one is:
                          Geom::UTM.instance_methods.sort.join("\n") (eval):894: warning: instance_methods: parameter will default to 'true' as of 1.8.1 to_a to_latlong to_s x y zone_letter zone_number

                          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

                            View.show_frame

                            Documentation for this method contains some poorly-parsed html tags.

                            Hi

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

                              @thomthom said:

                              @jim said:

                              Oh, I think there is a completely undocumented UTM class in there somewhere under Geom.

                              hm.. all I can find out about that one is:
                              Geom::UTM.instance_methods.sort.join("\n")... snip ...

                              from Wikipedia search on "UTM":
                              Universal Transverse Mercator coordinate system, a grid-based method of mapping locations on the surface of the Earth.
                              http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system
                              _

                              I'm not here much anymore.

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

                                Model.get_product_family
                                http://code.google.com/apis/sketchup/docs/ourdoc/model.html#get_product_family

                                @unknownuser said:

                                Returns a constant number which indicates the product family of the installed SketchUp application.

                                This is an Application related attribute, why is it part of the Model class?

                                This should be a method of the Sketchup module as in: Sketchup.get_product_family
                                _

                                I'm not here much anymore.

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

                                  Model.export
                                  http://code.google.com/apis/sketchup/docs/ourdoc/model.html#export

                                  @unknownuser said:

                                  options_hash______ A hash containing the COLLADA (.dae) export options.

                                  The options listed in the hash example is missing the option for hidden geometry.
                                  The Registry Attribute Name is "ExportHiddenGeometry", but what is the options hash key?

                                  • hiddengeometry ?* hidden_geometry ?
                                    _

                                  I'm not here much anymore.

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

                                    Set class
                                    http://code.google.com/apis/sketchup/docs/ourdoc/set.html

                                    This class is defined in the Objectspace and should be listed under "Core Ruby Classes" (along with Array, Length, Numeric and String.)

                                    Instead it's buried under "App Level Classes" and listed with all those classes that are defined inside the Sketchup module.
                                    _

                                    I'm not here much anymore.

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

                                      OptionsProviderObserver.onOptionsProviderChanged
                                      http://code.google.com/apis/sketchup/docs/ourdoc/optionsproviderobserver.html#onOptionsProviderChanged

                                      @unknownuser said:

                                      The onOptionsProviderChanged method is invoked when an element is added to an Pages object.

                                      Should read, "The onOptionsProviderChanged method is invoked when an option is changed for an OptionsProvider object."
                                      _

                                      I'm not here much anymore.

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

                                        Entities.add_curve
                                        http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/entities.html#add_curve

                                        Returns an array of edges - not a Curve object.

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

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

                                          @thomthom said:

                                          Entities.add_curve
                                          http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/entities.html#add_curve

                                          Returns an array of edges - not a Curve object.

                                          Ita's the same as add_circle which returns an array od edges and to find the just made curves curve you use edges=entities.add_curve(array_of_points) curve=edges[0].curve
                                          But strangely not with add_arc which returns an ArcCurve ?

                                          It would be unadvisable to change what the API does with these add_ methods - rather it we should keep it as is and fix the API's Guide to reflect it properly - too many scripts already get the curve from the edges array and would fail if it were updated to return the curve not the curve's edges...

                                          TIG

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

                                            @tig said:

                                            But strangely not with add_arc which returns an ArcCurve ?

                                            Nope, also returns an array.

                                            @tig said:

                                            It would be unadvisable to change what the API does with these add_ methods

                                            Agree.

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

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 11
                                            • 12
                                            • 13
                                            • 14
                                            • 15
                                            • 18
                                            • 19
                                            • 13 / 19
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement