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!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update

    PointTool for Mac

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

      @edson said:

      @mmyoung said:

      Yes, that is what was happening for me.
      When I changed it as shown, it loads. Does this edited version work for you?

      michael,

      i am always wary of making any changes to ruby scripts. i know nothing about it so all the times i tried to make changes to a script i ended up doing something wrong or forgetting some important thing. could you please post the changed script here so that i could try it?

      Here's a version that might be Mac friendly...
      Extract the .rb file and the subfolder+png-file into the Plugins folder...

      TIG

      1 條回覆 最後回覆 回覆 引用 0
      • EdsonE 離線
        Edson
        最後由 編輯

        sorry, tig. it did not work. thanks.
        pointool_error.png

        edson mahfuz, architect| porto alegre • brasil
        http://www.mahfuz.arq.br

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

          I now see the problem... here's a fix for that error ???Extract the .rb file and the subfolder+png-file into the Plugins folder...
          Ruby on Mac is less forgiving about parenthesizing arguments - it takes dothis(aaa,bbb) or dothis aaa,bbb, but while on a PC dothis (aaa),bbb will work it kills a Mac ! Then I made it dothis((aaa),bbb) and it works however...

          TIG

          1 條回覆 最後回覆 回覆 引用 0
          • EdsonE 離線
            Edson
            最後由 編輯

            still not working.pointool_error2.png

            edson mahfuz, architect| porto alegre • brasil
            http://www.mahfuz.arq.br

            1 條回覆 最後回覆 回覆 引用 0
            • wind-borneW 離線
              wind-borne
              最後由 編輯

              @edson said:

              to tell you the truth, i have a small problem with this tool: it does not load at startup. i always have to go to View>Toolbars to open it.

              If the original tool itself works why not give it
              (a) a keyboard shortcut
              or
              (b) put it in the customizable toolbar?

              Either of these bypass the need for the Point Tool toolbar.


              SketchUp Preferences.png


              SketchUp.png

              "To read between the lines was easier than to follow the text."OSX 10.11.6

              %(#BF80BF)[SU 8 pro

              1 條回覆 最後回覆 回覆 引用 0
              • EdsonE 離線
                Edson
                最後由 編輯

                @wind-borne said:

                If the original tool itself works why not give it
                (a) a keyboard shortcut
                or
                (b) put it in the customizable toolbar?

                Either of these bypass the need for the Point Tool toolbar.

                by all means, why not? thanks.

                edson mahfuz, architect| porto alegre • brasil
                http://www.mahfuz.arq.br

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

                  Edson

                  That report is from the old version - the new one does not have those lines of code in it !
                  Can you check that you don't have a duplicate loading from another Plugins folder ?
                  Read the path in the error message and ensure that that file is this new one...
                  I know there has been some Mac folder confusion in the past...

                  TIG

                  1 條回覆 最後回覆 回覆 引用 0
                  • EdsonE 離線
                    Edson
                    最後由 編輯

                    tig,

                    you were right. i must have done something wrong before. no error messages this time. however, the problem remains the same: the toolbar is not loaded automatically when i start sketchup, as most do.

                    edson mahfuz, architect| porto alegre • brasil
                    http://www.mahfuz.arq.br

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

                      Try this adjusted versionPointTool.rb

                      TIG

                      1 條回覆 最後回覆 回覆 引用 0
                      • EdsonE 離線
                        Edson
                        最後由 編輯

                        the tool works fine, no error messages, but it does not load when i open sketchup.

                        edson mahfuz, architect| porto alegre • brasil
                        http://www.mahfuz.arq.br

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

                          THIS should load the toolbar - IF it were open the last time you closed SUp, if it doesn't open the toolbar then close SUp, reopen SUp and the toolbar should still be active ?PointTool.rb

                          TIG

                          1 條回覆 最後回覆 回覆 引用 0
                          • EdsonE 離線
                            Edson
                            最後由 編輯

                            IT WORKS!!! 👍 👍

                            edson mahfuz, architect| porto alegre • brasil
                            http://www.mahfuz.arq.br

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

                              😄 😄 😍

                              TIG

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

                                Just downloaded PointTool_1.2, using SU 2016 on iMac El Capitan, with autoinstall from the SketchUcation plugin store.

                                Works fine as installed automatically, but puts Draw Points on the Extensions menu (formerly Plugins). I wanted to put it on the Draw menu, so changed one line in this part (sorry, don't have line numbers in my Text Editor)

                                ` unless file_loaded?(FILE)
                                file_loaded(FILE)
                                $submenu ? (organizer = $submenu) : (organizer = UI.menu("Plugins"))
                                organizer.add_item("Draw points"){ pointtool }

                                p=Sketchup.find_support_file("Plugins")
                                cmd = UI::Command.new("Draw points"){ pointtool }
                                cmd.large_icon = cmd.small_icon = File.join(p, "PointTool", "PointTool.png")
                                cmd.tooltip = cmd.status_bar_text = "Draw some points"
                                UI::Toolbar.new("Point Tool").add_item cmd
                                

                                end`

                                I changed just part of this line from:

                                $submenu ? (organizer = $submenu) : (organizer = UI.menu("Plugins"))

                                to

                                $submenu ? (organizer = $submenu) : (organizer = UI.menu("Draw"))

                                but now the plugin errors on loading. And still errors if I change the line back to have "Plugins" as in the original.

                                Any thoughts on why this is happening, and how I could get it to load in the Draw menu?

                                Of course I can (and shortly will) add a shortcut (probably Shift P) but I don't understand why this simple change stops the plugin working. I was using the built in Mac TextEdit.app which I assumed did what it says on the tin, like Notepad on Windows - or is it more like WordPad, and adding non-text characters to the file when saved?

                                John McC

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

                                  Ah. It seems that the problem lay in the TextEdit app - when I found and installed Brackets instead, and made the same edit, it does what I expected.

                                  Ah well, it takes a while for a decades-long Windows user to get used to a new iMac...!

                                  John McC

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • fredo6F 離線
                                    fredo6
                                    最後由 編輯

                                    It looks like a problem of file encoding due to your editor. This is why it does not work even when restoring the menu to its original value.

                                    The file should encoded UTF8 without BOM.

                                    You could use notepad++ (free and quite powerful editor), whenever you manipulate Ruby.

                                    Fredo

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • D 離線
                                      driven
                                      最後由 編輯

                                      unless you use the old SmartMustard plugin organizer [which I doubt]...

                                      get rid of the $organiser bit....

                                      
                                        menu = UI.menu('Draw')
                                        menu.add_item('Draw points') { pointtool }
                                      

                                      I can see other errors in a very old copy I checked, that may have been fixed by TIG...
                                      if the next line starts with p =, then it's not fixed...

                                      BTW... the free TextWrangler.app is much better for editing all kinds of files...

                                      EDIT: the rest of the file is needing work there are a number of places it use a 'reserved' word...
                                      this was why i asked about the p, before re-reading your code block...

                                        plgs = Sketchup.find_support_file('Plugins')
                                        cmd = UI;;Command.new('Draw points') { pointtool }
                                        cmd.large_icon = cmd.small_icon = File.join(plgs, 'PointTool', 'PointTool.png')
                                      
                                      
                                        def create_geometry(pt, view)
                                          view.model.active_entities.add_cpoint pt
                                          view.invalidate
                                        end
                                      
                                      
                                        def no_points_here?(pt)
                                          Sketchup.active_model.entities.select { |e| e.class == Sketchup;;ConstructionPoint }.each do |e|
                                            return false if e.position.to_a == pt.to_a
                                          end
                                      

                                      john

                                      learn from the mistakes of others, you may not live long enough to make them all yourself...

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

                                      Advertisement