sketchucation logo sketchucation
    • 登入
    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!
    🔌 Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download

    New API doc - typos and questions

    已排程 已置頂 已鎖定 已移動 Developers' Forum
    370 貼文 35 Posters 270.1k 瀏覽 35 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • thomthomT 離線
      thomthom
      最後由 編輯

      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 條回覆 最後回覆 回覆 引用 0
      • Dan RathbunD 離線
        Dan Rathbun
        最後由 編輯

        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 條回覆 最後回覆 回覆 引用 0
        • J 離線
          Jim
          最後由 編輯

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

          Hi

          1 條回覆 最後回覆 回覆 引用 0
          • thomthomT 離線
            thomthom
            最後由 編輯

            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 條回覆 最後回覆 回覆 引用 0
            • J 離線
              Jim
              最後由 編輯

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

              Hi

              1 條回覆 最後回覆 回覆 引用 0
              • thomthomT 離線
                thomthom
                最後由 編輯

                @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 條回覆 最後回覆 回覆 引用 0
                • J 離線
                  Jim
                  最後由 編輯

                  View.show_frame

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

                  Hi

                  1 條回覆 最後回覆 回覆 引用 0
                  • Dan RathbunD 離線
                    Dan Rathbun
                    最後由 編輯

                    @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 條回覆 最後回覆 回覆 引用 0
                    • Dan RathbunD 離線
                      Dan Rathbun
                      最後由 編輯

                      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 條回覆 最後回覆 回覆 引用 0
                      • Dan RathbunD 離線
                        Dan Rathbun
                        最後由 編輯

                        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 條回覆 最後回覆 回覆 引用 0
                        • Dan RathbunD 離線
                          Dan Rathbun
                          最後由 編輯

                          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 條回覆 最後回覆 回覆 引用 0
                          • Dan RathbunD 離線
                            Dan Rathbun
                            最後由 編輯

                            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 條回覆 最後回覆 回覆 引用 0
                            • thomthomT 離線
                              thomthom
                              最後由 編輯

                              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 條回覆 最後回覆 回覆 引用 0
                              • TIGT 離線
                                TIG Moderator
                                最後由 編輯

                                @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 條回覆 最後回覆 回覆 引用 0
                                • thomthomT 離線
                                  thomthom
                                  最後由 編輯

                                  @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 條回覆 最後回覆 回覆 引用 0
                                  • TIGT 離線
                                    TIG Moderator
                                    最後由 編輯

                                    @thomthom said:

                                    @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.

                                    Perhaps I meant to say, "... add_arc which says it returns an ArcCurve wrongly!" 😒

                                    TIG

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • thomthomT 離線
                                      thomthom
                                      最後由 編輯

                                      Sketchup.write_default
                                      Sketchup.read_default
                                      http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/sketchup.html#write_default
                                      http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/sketchup.html#read_default

                                      @unknownuser said:

                                      [..] the string associated with a value within the specified sub-section section of a .INI file or registry (within the Software > @Last Software > SketchUp section).

                                      Is it really stored under @Last any more?

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

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • TIGT 離線
                                        TIG Moderator
                                        最後由 編輯

                                        @thomthom said:

                                        Sketchup.write_default
                                        Sketchup.read_default
                                        http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/sketchup.html#write_default
                                        http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/sketchup.html#read_default

                                        @unknownuser said:

                                        [..] the string associated with a value within the specified sub-section section of a .INI file or registry (within the Software > @Last Software > SketchUp section).

                                        Is it really stored under @Last any more?

                                        No, / Google / Sketchup 7 / etc... 😉

                                        TIG

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • thomthomT 離線
                                          thomthom
                                          最後由 編輯

                                          Group.move!
                                          http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/group.html#move!

                                          .move! moves to an absolute point. Worth noting in the manual.

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

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • Dan RathbunD 離線
                                            Dan Rathbun
                                            最後由 編輯

                                            Geom::Point3d.+
                                            http://code.google.com/apis/sketchup/docs/ourdoc/point3d.html#+

                                            @unknownuser said:

                                            The '+' operator is a fast way to add to the current x, y and z values of a point, or to set the values of a point by adding to other points together.
                                            The end of the sentence should read, "...by adding **two** other points together."

                                            @unknownuser said:

                                            Returns:
                                            vector a Vector object
                                            There is no defined object named 'vector'. If we follow the example the class of the result is given as Geom::Point3d.

                                            pt2 = Geom;;Point3d.new(100,200,300)
                                            pt3 = pt2 + [1,1,1]
                                            >> Point3d(101, 201, 301)
                                            pt3.class
                                            >> Geom;;Point3d
                                            

                                            @unknownuser said:

                                            Arguments:
                                            point2 A Point3d object.
                                            An ArugemtError exception is raised if point2 is a Point3d object.
                                            Valid argument classes are: Array or Vector3d. This means to use a Point3d as an argument, you must convert to Array. Example:

                                            pt3 = pt1 + pt2.to_a
                                            

                                            This method needs to be fixed to take a Point3d object and internally convert it to an Array...

                                            # internal to + method
                                            if arg[0].is_a? Point3d { arg[0]=arg[0].to_a }
                                            

                                            ...or a Vector3d:

                                            # internal to + method
                                            if arg[0].is_a? Point3d { arg[0]=[0,0,0].vector_to(arg[0]) }
                                            

                                            either way. The current implementation is clumsy.

                                            I'm not here much anymore.

                                            1 條回覆 最後回覆 回覆 引用 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 18
                                            • 19
                                            • 3 / 19
                                            • 第一個貼文
                                              最後的貼文
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement