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

    Preparing for SmustardOrganizer script

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

      If you run OrganizerEdit on your scripts, then organize them in subfolders (one level deep only), they will all load whenever you start SketchUp, with submenu items according to their locations. If you rearrange them, then restart SketchUp, they will automatically load with new submenu items, because the submenus are created dynamically at load-time based on the subfolder name.

      If a script/plugin comes Organizer-ready, there's nothing to do - it will load when you load Sketchup, however you decide to organize it.

      If it's not Organizer-ready, you'd have to run OrganizerEdit to make it Organizer-compatible. That wouldn't affect the other scripts.

      You could, I suppose (haven't tried it yet), run Organizer manually when you downloaded a new script to bring it into the menu. It shouldn't duplicate menu items for previously-loaded scripts.

      Did I answer your question?

      RickW
      [www.smustard.com](http://www.smustard.com)

      1 條回覆 最後回覆 回覆 引用 0
      • jujuJ 離線
        juju
        最後由 編輯

        Kind of, I suppose. Trial and error will tell...

        Save the Earth, it's the only planet with chocolate.

        1 條回覆 最後回覆 回覆 引用 0
        • R 離線
          RickW
          最後由 編輯

          There are two parts to Organizer. One part is OrganizerEdit, which will rewrite .rb files with a bit of code so that they can be placed in a subfolder and loaded to submenus corresponding to the subfolder. Once the file is edited, it can be moved to any subfolder and will load appropriately - you don't need to re-edit it to move it around.

          The second part is Organizer, which does three things: it reads the immediate subfolders of the Plugins folder, creates a submenu in the Plugins menu for each folder it finds (and that isn't in the "exclude" file), and creates a menu item in that submenu for each .rb file it finds in that subfolder. That's a bit over-simplified, but it gets the idea across.

          So, if you decide you want to move a .rb file from Plugins/Draw to Plugins/Modify, just move it. The next time you start SketchUp, that script will be in the Plugins>Modify menu without you having to do anything but move the file.

          RickW
          [www.smustard.com](http://www.smustard.com)

          1 條回覆 最後回覆 回覆 引用 0
          • R 離線
            RickW
            最後由 編輯

            I've almost finished work on a tool to help make the best use of Organizer. It will traverse your plugins and determine which files need to be located directly in the "Plugins" folder (anything that is "required" by another plugin should be either in the "Plugins" folder or the "Tools" folder).

            This will solve about 99% of the problems some users have with Organizer (moving files that shouldn't be moved).

            This file will be included with the Organzier download.

            RickW
            [www.smustard.com](http://www.smustard.com)

            1 條回覆 最後回覆 回覆 引用 0
            • BurkhardB 離線
              Burkhard
              最後由 編輯

              I remember the hard times to do such things manualy 😉

              [http://www.ia-plus.de(http://www.ia-plus.de)]

              1 條回覆 最後回覆 回覆 引用 0
              • jujuJ 離線
                juju
                最後由 編輯

                Rick, will revised version (-s) be available for free upgrade to existing script owners or not?

                Save the Earth, it's the only planet with chocolate.

                1 條回覆 最後回覆 回覆 引用 0
                • R 離線
                  RickW
                  最後由 編輯

                  Generally, updates are free to previous customers. We haven't really had upgrades yet, but that will be up to the author. I expect upgrades would generally have a nominal upgrade fee.

                  The tool I mentioned above will be part of an update, so it will be free to existing Organizer license owners.

                  RickW
                  [www.smustard.com](http://www.smustard.com)

                  1 條回覆 最後回覆 回覆 引用 0
                  • jujuJ 離線
                    juju
                    最後由 編輯

                    Sweet, so I'll get an e-mail then notifying me just as I got an e-mail the other day asking for feedback.

                    Save the Earth, it's the only planet with chocolate.

                    1 條回覆 最後回覆 回覆 引用 0
                    • R 離線
                      RickW
                      最後由 編輯

                      I can do that. But the best way to stay informed is to "subscribe" - RSS and Atom feeds are available. 😄

                      There are several readers and subscription managers out there (reader.google.com, http://www.bloglines.com, others), and you can get updates and news about the latest scripts delivered directly.

                      I've been thinking about an automatic email notifier, but haven't implemented it yet...

                      RickW
                      [www.smustard.com](http://www.smustard.com)

                      1 條回覆 最後回覆 回覆 引用 0
                      • jujuJ 離線
                        juju
                        最後由 編輯

                        I've already got Smustard on my RSS feeds... 😉

                        Save the Earth, it's the only planet with chocolate.

                        1 條回覆 最後回覆 回覆 引用 0
                        • R 離線
                          RickW
                          最後由 編輯

                          Cool! Then you're all set 😄

                          RickW
                          [www.smustard.com](http://www.smustard.com)

                          1 條回覆 最後回覆 回覆 引用 0
                          • H 離線
                            Haggai
                            最後由 編輯

                            Hi Rick,
                            I got the organizer and install many of my scripts there in different folder, it seems that many of the file did not get change but i will still look thru all of them, i already saw some that are not but they are neither in the log file.
                            another thing that i am getting is this message and I don't know what to do with it,

                            "Error Loading File organizer.rb
                            undefined method `add_item' for nil:NilClass"

                            thank you for your help there.

                            [haggai]

                            1 條回覆 最後回覆 回覆 引用 0
                            • H 離線
                              Haggai
                              最後由 編輯

                              Rick, another thing my "select at startup" is not funtioning anymore i downloade the last version but it still not selecting, does it go in another place than the plugins folder?

                              [haggai]

                              1 條回覆 最後回覆 回覆 引用 0
                              • R 離線
                                RickW
                                最後由 編輯

                                Not all files will be edited - only those that have a menu item in the Plugins menu will be edited. They can still be put in subfolders, but will appear in their specified menu locations.

                                SelectAtStartup (startup.rb) should be located in the Plugins folder, not in a subfolder.

                                Make sure you don't have sketchup.rb, langhandler.rb, or oImage.rb in your Plugins folder.

                                RickW
                                [www.smustard.com](http://www.smustard.com)

                                1 條回覆 最後回覆 回覆 引用 0
                                • H 離線
                                  Haggai
                                  最後由 編輯

                                  @rickw said:

                                  SelectAtStartup (startup.rb) should be located in the Plugins folder, not in a subfolder.

                                  Make sure you don't have sketchup.rb, langhandler.rb, or oImage.rb in your Plugins folder.

                                  I don't have these files in my plugings folder, they are in the "tools" folder.

                                  @rickw said:

                                  Not all files will be edited - only those that have a menu item in the Plugins menu will be edited. They can still be put in subfolders, but will appear in their specified menu locations.

                                  Can I edit the other file manualy to have them be "organizer.rb friendly"?
                                  if yes what do I need to change?

                                  I still don't know what is the message
                                  "Error Loading File organizer.rb
                                  undefined method `add_item' for nil:NilClass"
                                  is there things I need to do, I read all the infos about how to install bout ten times, i think that i did it ok and it work for many of the rubys, I don't mind if they do not all get organized now but the message is in the way.

                                  thank you

                                  [haggai]

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • R 離線
                                    RickW
                                    最後由 編輯

                                    Open the ruby console (Window>Ruby Console) and type
                                    load "organizer.rb"
                                    then press <enter>. If the error message displays, copy and paste it into a message - make sure to copy everything in the console.

                                    RickW
                                    [www.smustard.com](http://www.smustard.com)

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • H 離線
                                      Haggai
                                      最後由 編輯

                                      OK thank you, i did as you said and locate the error message, it came from a french stair ruby i removed it and now i don't get the message anymore.

                                      this was the error line when a run ( load "organizer.rb" )
                                      Error: #<NoMethodError: C:/Program Files/Google/Google SketchUp 6/Plugins/10 French/fr_stair_maker062.rb:210: undefined method `add_item' for nil:NilClass>

                                      haggai

                                      here is the ruby file that i removed what shall I do to it to function
                                      http://www.sketchucation.com/forums/scf/sas/Ruby/fr_stair_maker062.rb

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • H 離線
                                        Haggai
                                        最後由 編輯

                                        The file is missing information for creating menu items. I downloaded it from Didier's website, and it is non-functional in both the French (which you posted) and English (which I downloaded) versions.

                                        I fixed the file (attached below), and it should now work.

                                        301 Moved Permanently

                                        favicon

                                        (www.sketchucation.com)

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • H 離線
                                          Haggai
                                          最後由 編輯

                                          Rick,thank you for looking into this for me, I put the file yuo sent to the pluggings folder and it function ( but the script in imperial and not metric ).
                                          the other thing is that if I put it in my "French" subfolder it still gives me the same error message

                                          I give you the error message plus few lines above concerning the same script

                                          C:/Program Files/Google/Google SketchUp 6/Plugins/10 French/fr_stair_maker062.rb:179: warning: (...) interpreted as grouped expression
                                          C:/Program Files/Google/Google SketchUp 6/Plugins/10 French/fr_stair_maker062.rb:195: warning: (...) interpreted as grouped expression
                                          C:/Program Files/Google/Google SketchUp 6/Plugins/10 French/fr_stair_maker062.rb:288: warning: (...) interpreted as grouped expression
                                          C:/Program Files/Google/Google SketchUp 6/Plugins/10 French/fr_stair_maker062.rb:304: warning: (...) interpreted as grouped expression
                                          C:/Program Files/Google/Google SketchUp 6/Plugins/10 French/fr_stair_maker062.rb:29: warning: method redefined; discarding old archetypesElements_straightConcreteStair
                                          C:/Program Files/Google/Google SketchUp 6/Plugins/10 French/fr_stair_maker062.rb:131: warning: method redefined; discarding old archetypesElements_straightSteelStair
                                          Error: #<NoMethodError: C:/Program Files/Google/Google SketchUp 6/Plugins/10 French/fr_stair_maker062.rb:210: undefined method `add_item' for nil:NilClass>

                                          thank you very much for helping

                                          for my other files it seems that the first time I ran the organizer.rb it did not take everything but now I bring many of the file back to the pluggins folder run the script and put them back after. I think that it should be different but this way now I see what is happening, but for the future will I have to put my scripts first in the pluggins folder and then move them to subfolder or can I put them straight in the subfolder??

                                          I am sorry for taking so much of your time but hopefully my questions will help others like me.

                                          haggai

                                          http://www.sketchucation.com/forums/scf/sas/Ruby/load error.png

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • R 離線
                                            RickW
                                            最後由 編輯

                                            When you download new scripts, they will have to be modified to work with Organizer. The organizerEdit script only looks in the Plugins folder for scripts to edit (so that things that have been edited and organized aren't re-examined).

                                            So download to the Plugins folder, perform the auto edit, then organize and restart Sketchup.

                                            I didn't look too carefully at the stair script, just added the appropriate menu lines. It looks like the script has other issues, and unfortunately I don't have time right now to troubleshoot it. Sorry...

                                            RickW
                                            [www.smustard.com](http://www.smustard.com)

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

                                            Advertisement