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

    New API doc - typos and questions

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

      @thomthom said:

      Wish we had red pens to scribble on the docs. 😄

      Great idea, really. I'm sure there are browser plugins that allow social sharing of sticky notes, or comments on web pages.

      Hi

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

        Oh, yea... at least for Firefox. I mean to remember something like that.

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

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

          Could this be something? https://addons.mozilla.org/en-US/firefox/addon/2792
          Anyone tried it? Or got better solutions?

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

          1 條回覆 最後回覆 回覆 引用 0
          • Chris FullmerC 離線
            Chris Fullmer
            最後由 編輯

            Point3d.project_to_plane:

            http://code.google.com/apis/sketchup/docs/ourdoc/point3d.html#project_to_line

            Shows the wrong example code (uses from project to line). and I know I gave the link for project_to_line. Its so you can see both methods simultaneously and see the error better. Thanks!

            Chris

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

            1 條回覆 最後回覆 回覆 引用 0
            • Chris FullmerC 離線
              Chris Fullmer
              最後由 編輯

              So far I am really truly enjoying the new docs. They feel much better, thanks for the efforts to get them to where they are. I'm also excited that changes might be able to happen faster now too, that is great.

              I'm noticing that sometimes in the methods list, when I click on a method, it takes me to the class index for that method. Other times it willtake me directly to the entry for that method within the class. I prefer the latter. But I don't know why sometimes it does one thing and sometimes it does another,

              Chris

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

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

                Error 404 (Not Found)!!1

                favicon

                (code.google.com)

                It doesn't mention how to allow drop-down options by using a third array with strings separating each option with a pipe | character.

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

                1 條回覆 最後回覆 回覆 引用 0
                • Chris FullmerC 離線
                  Chris Fullmer
                  最後由 編輯

                  You can do a dropdown box?

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

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

                    UI.inputbox ['Hello'], ['World'], ['Mars|Pluto|World|Monkeys'], 'Title'

                    "Global Material Changer" and "Component Spray" uses it. That's the only way I knew it was possible.

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

                    1 條回覆 最後回覆 回覆 引用 0
                    • J 離線
                      Jim
                      最後由 編輯

                      @chris fullmer said:

                      You can do a dropdown box?

                      Sure, and I made this to ease the pain a little: http://sketchuptips.blogspot.com/2008/03/inputbox-class.html

                      Hi

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

                        Nice one Jim.

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

                        1 條回覆 最後回覆 回覆 引用 0
                        • Chris FullmerC 離線
                          Chris Fullmer
                          最後由 編輯

                          http://code.google.com/apis/sketchup/docs/ourdoc/point3d.html#z=

                          It says:

                          Point3d.z=
                          
                              The y= method is used to set the z value of a 3D point.
                          

                          That second line should say "The z= method..."

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

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

                            Error 404 (Not Found)!!1

                            favicon

                            (code.google.com)

                            Face.area actually takes an optional argument. I'm not sure what the argument is. It accepts pure numbers which then seems to be a scale factor. But it also accepts Transformation objects.

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

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

                              Same applies to Edge.length

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

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

                                Point3d.project_to_plane
                                The example uses project_to_line

                                
                                 plane = [Geom;;Point3d.new(0,0,0), Geom;;Vector3d.new(0,0,1)]
                                 point = Geom;;Point3d.new 10,10,10
                                 projected_point = point.project_to_line line
                                
                                

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

                                1 條回覆 最後回覆 回覆 引用 0
                                • Chris FullmerC 離線
                                  Chris Fullmer
                                  最後由 編輯

                                  Tool - onMouseMove example has a bad local variable.
                                  http://code.google.com/apis/sketchup/docs/ourdoc/tool.html#onMouseMove

                                   def onMouseMove(flags, x, y, view)
                                     puts "onMouseMove; flags = " + key.to_s
                                     puts "                 x = " + x.to_s
                                     puts "                 y = " + y.to_s
                                     puts "              view = " + view.to_s
                                   end
                                  

                                  The variable "key" should be replaced with "flag" I think. That makes the example work.

                                  Chris

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

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

                                    http://code.google.com/apis/sketchup/docs/ourdoc/face.html#get_UVHelper

                                    The code example:

                                    
                                     model = Sketchup.active_model
                                     entities = model.active_entities
                                     pts = []
                                     pts[0] = [0, 0, 0]
                                     pts[1] = [9, 0, 0]
                                     pts[2] = [9, 9, 0]
                                     pts[3] = [0, 9, 0]
                                    
                                     # Add the face to the entities in the model
                                     face = entities.add_face pts
                                     tw = Sketchup;;TextureWriter.new
                                     uvHelp = face.get_UVHelper true, true, tw
                                    
                                    

                                    This will return the error:

                                    @unknownuser said:

                                    Error: #<TypeError: (eval):95:in `get_UVHelper': wrong argument type (expected Sketchup::TextureWriter)>
                                    (eval):95

                                    Instead of tw = Sketchup::TextureWriter.new, the method tw = Sketchup.create_texture_writer will work.
                                    Which leads to another questions: why can't tw = Sketchup::TextureWriter.new be used as in the example?

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

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

                                      ModelObserver.onPlaceComponent
                                      http://code.google.com/apis/sketchup/docs/ourdoc/modelobserver.html#onPlaceComponent

                                      The manual claims that a Model is passed on as the argument, but instead it's the ComponentInstance. I have not tested the rest of the ModelObserver events to see if they also match.

                                      onPlaceComponent FIXED

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

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • scottliningerS 離線
                                        scottlininger
                                        最後由 編輯

                                        @thomthom said:

                                        ModelObserver.onPlaceComponent
                                        http://code.google.com/apis/sketchup/docs/ourdoc/modelobserver.html#onPlaceComponent

                                        The manual claims that a Model is passed on as the argument, but instead it's the ComponentInstance. I have not tested the rest of the ModelObserver events to see if they also match.

                                        Thomas, you rock.

                                        I'll double check all of the modelobserver arguments. Thanks!

                                        • Scott Lininger
                                          SketchUp Software Engineer
                                          Have you visited the Ruby API Docs?
                                        1 條回覆 最後回覆 回覆 引用 0
                                        • R 離線
                                          remus
                                          最後由 編輯

                                          For Point3d.distance_to_line the docs give the same example as point3d.distance.

                                          http://remusrendering.wordpress.com/

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

                                            I can't get the DefinitionObserver to trigger at all. http://code.google.com/apis/sketchup/docs/ourdoc/definitionobserver.html Neither the onComponentInstanceAdded or onComponentInstanceRemoved events. Are these the correct event names?

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

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

                                            Advertisement