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
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • 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
            • H 離線
              Haggai
              最後由 編輯

              Thank you for your quick reply on that, I imagine that you are busy for the rest of the stuff i asked.
              I will wait maybe someone else had the same problem.

              again thank you.

              [Haggai]

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

                I put the file into a subfolder. It loaded without problems, and it works correctly. I'm not sure why you are gettting the error messages. Is the script in two folders (like Plugins AND 10 French)? Make sure there are no duplicate scripts.

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

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

                  Rick thank you again for this help,
                  so I look and I found the script was there but the english version with a different ruby name, I wanted to have a subfolder with all my french ruby because most of the time the mesurment there are metric, I am french and I work with both metric and Imperial, now i am in the US for a while and all i need to do is imperial but sometime i get some request from france and need to work in metric. Is there a way to have both sets. it seems that the problem is that both script call the same action or something like that and causes a confict somewhere. I don't know anything about ruby script really but i am willing to learn.

                  by the way I reorganise the rest of all my script to be organiseable, now one thing i wish to have is the possibility to have all my plugings in one submenu in the context menu like the script TIG made (ContextMenuMenus.rb) he has all the menus (1,2,3,4,5,6,8) he jumped the 7 which is the pluging menu because it is different in each user.
                  submenu1=submenus.add_submenu("Edit...") ### adds the submenus for the items that follow
                  submenu2=submenus.add_submenu("View...")
                  submenu3=submenus.add_submenu("Camera...")
                  submenu4=submenus.add_submenu("Draw...")
                  submenu5=submenus.add_submenu("Tools...")
                  submenu6=submenus.add_submenu("Window...")
                  submenu8=submenus.add_submenu("Help...")
                  So i wanted to put the 7th submenu in the list. Is there a way that something can be done with organizer.rb to read all that is in the plugins folder and add them to the submenu7 in the context menu ???
                  this will be a big plus to your script.
                  untill now you have solved all my problems.
                  thank you for all your useful scripts

                  [Haggai]

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

                    You can add a folder name to the SmustardOrganizerExcludeFolders.txt file, and that folder will not be loaded. Or you can add "--" to the front of a folder name and it will not load. This way, you can prevent the metric and imperial from both loading - just exclude the one you don't want to use. When you need to switch, change the excluded folder and restart Sketchup.

                    While it is possible to add the whole plugins menu to the context menu, it won't be immediately available with Organizer, but perhaps in a future version I will add that.

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

                    1 條回覆 最後回覆 回覆 引用 0
                    • JClementsJ 離線
                      JClements
                      最後由 編輯

                      Hi Rick:

                      Couple of questions/requests:

                      1. Could you post a screen capture of how a typical "organized" plugin directory would appear?

                      2. Is there any way for the organizer script [assuming the Smustard (or any other scripts) were properly annotated] to display the revision number? And, if not the Organizer script, perhaps another similar script,ie., an "About.rb" script, to detect the rev levels?

                      3. Would there be a method for the users to control the order of scripts within a folders (short of renaming them) or is this still controlled by SU as it loads the scripts into memory?

                      Regards, John

                      JClements at brwncald daught com

                      John | Illustrator | Beaverton, Oregon

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

                        1. Well, I think it's up to the individual user, but I created the following folders:
                        • Cameras-Pages
                        • Draw-Create
                        • Edit-Modify
                        • Export-Import
                        • Selection
                        • Textures-Materials
                          There are items not in folders, but I think the majority are categorized.
                        1. The annotation part is the key. I could try to create something like that, but my guess is that it would be rather "iffy". For Smustard scripts, a quick trip to MySmustard (via the Smustard Toolbar) will give you a synopsis of the last script version you downloaded, compared to the version currently available.

                        2. I think it's still controlled loosely by SU and/or the OS. Organzier could load things alphabetically by sorting the directory list before loading, but that's about the extent of it. It would be possible to create a text file that indicates the order to load scripts, but I think that would be prone to problems if things got moved or deleted. I'll think about how that might be implemented and see if it could be workable.

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

                        1 條回覆 最後回覆 回覆 引用 0
                        • JClementsJ 離線
                          JClements
                          最後由 編輯

                          Thanks, Rick

                          John | Illustrator | Beaverton, Oregon

                          1 條回覆 最後回覆 回覆 引用 0
                          • N 離線
                            not registered yet
                            最後由 編輯

                            Rick,
                            Maybe I'm just not getting it today, but I have followed the instructions given for Organizer and keep getting this message when I run organizerEdit.txt from the Ruby console.

                            organizerEdit.txt
                            Error: #<NameError: (eval):196: undefined local variable or method `organizerEdit' for #Object:0xe8a6880>
                            (eval):196

                            If I go ahead and add my folders, they show on the plugins menu, but don't do anything. And the original plugins are still listed as before!!?

                            Any idea what's going on?

                            [TonyF]

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

                              Rather than typing
                              organizerEdit.txt

                              you need to type
                              load "organizerEdit.txt"

                              Hope that helps...

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

                              1 條回覆 最後回覆 回覆 引用 0
                              • N 離線
                                not registered yet
                                最後由 編輯

                                organizerEdit.txt ran okay, but I didn't get a log file.
                                Further, when I create a sub folder under plugins, it shows on the Plugins menu drop down, but any files I put in that folder are listed underneath it, not inside it?

                                [TonyF]

                                1 條回覆 最後回覆 回覆 引用 0
                                • N 離線
                                  not registered yet
                                  最後由 編輯

                                  Rick,
                                  I'm still not having much success 😞
                                  "organizerEdit.txt" seems to run okay - i.e. the Ruby conole shows no errors, but no log file is produced.
                                  If I add a new sub-folder to the plugins folder, it does not show in the Plugins menu until I put a ruby file in the new folder. Even then, the ruby that I have just put in to the sub-folder, does not show up as a sub-menu item, but is listed below the new sub-menu item on the main Plugins menu drop down.
                                  Confused ?? That make two of us 😄
                                  Any ideas??

                                  [TonyF]

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

                                    It sounds like the .rb files didn't get edited. Please contact me through Smustard so we can email back and forth. I would like to see some of the files that are giving you problems.

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

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

                                      I finally restructured Organizer. This adds a troubleshooter and OrganizerEdit into a Tools>Organizer menu item.

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

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

                                        let us know when you're letting it into the wild

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

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

                                          I am updating Organizer again. The main change is for accommodating plugins that have subfolders for required files.

                                          The update provides a mechanism for developers to easily exclude their subfolders so Organizer will not try to load the contents of those folders. This should result in a smoother experience for users, who won't have to contend with manually maintaining the excluded folders list in the SmustardOrganizerExcludeFolders.txt file.

                                          Developers: in your subfolder, create a text file called "exclude.txt" that has as its contents the plain text name of the subfolder - that's it! You can use the attached file and change "myFolderName" to your subfolder's name if you want.

                                          The new version should be available starting Monday (14 Sept 2009).


                                          exclude.txt

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

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

                                            Organizer 1.4 is now available.

                                            To update to Organizer 1.4, you have three possible options:

                                            1. Use the download link you previously received when you purchased your license. If you don't have it, then
                                            2. Use the "MySmustard" button on the free Smustard Toolbar. Register using the email address provided when you purchased your license. If you don't have that account, or if you just don't want to install the Smustard Toolbar (which also gives you access to relevant upgrade offers), then
                                            3. Email me and I'll hunt down your information. If too many need/choose this option, my response may be delayed, and I may need to come up with an alternative method.

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

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

                                            Advertisement