• Login
sketchucation logo sketchucation
  • Login
πŸ”Œ Quick Selection | Try Didier Bur's reworked classic extension that supercharges selections in SketchUp Download

[Plugin] Components manager plugin

Scheduled Pinned Locked Moved Plugins
156 Posts 15 Posters 42.7k Views 15 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    inteloide
    last edited by 13 Jan 2014, 22:16

    Hello JQL,

    Just post a new version that correct all bugs you had.

    Updates are :
    Corrected : When clicking on model to component within groups, component was not shown
    Corrected : When selecting multiple item in the list make all the list outlined
    Corrected : Components without extension are now managed ok.
    Optimized : Click on a group in the model then group is also outlined in list.
    Optimized : Reduce Javascript code in HTML page
    Added : Link to forum page in about screen

    Could you please check that files without extension ("c:/tatata/toto") are working properly ?

    About revision management, this is how it work.
    Imagine a model (A.skp) with component ("toto") saved on hard drive or wherever.
    Imagine that each time you make a modification to the component, you want to keep history of the file, so you save it with a revision level (for example "rev...")
    So in your folder, you may have files like :

    • toto.skp
    • toto rev 1.skp
    • toto rev 2.skp
    • toto rev3.skp
    • toto rev4.skp

    And when you open your model (A.skp), you want to upload the latest revision of "toto" component, so "toto rev4.skp".

    Then, you just have to choose option "Use revision level system" and the plugin will upload only the last revision !

    When saving (by right-cliking on the component in the list...not using save all components...sorry, I have to add this function too), it asks you if you want to create a new revision, ie "toto rev5.skp".

    The text to define revision level can be choosen in options menus.
    Pay attention to a following rules :

    1. spaces are important : if revision text is " rev" (with a space before), "totorev1.skp" is not the revision 1...
    2. revision level can be float number, but better to use rounded number (because "rev 1.3" will new newer than "rev 1.11", as 1.3>1.11)
    3. nothing after revision : "rev 1 (super)" won't works.
    4. on file, if you put letter instead of figure ("rev A") it may crash...

    Humanity will do a huge step when the IT professionals will understand that computers are tools...

    1 Reply Last reply Reply Quote 0
    • J Offline
      JQL
      last edited by 13 Jan 2014, 22:26

      It seems super, this week will be a hard one to keep up with you, but I'll try as soon as possible...

      I'll check what you asked for right now.

      Thanks again,

      JQL

      www.casca.pt
      Visit us on facebook!

      1 Reply Last reply Reply Quote 0
      • J Offline
        JQL
        last edited by 14 Jan 2014, 08:33

        Hi Inteloide,

        1 - Component manager is now able to save without extension but it's still unable to find a reference that was saved that way.
        2 - I understood the concept of versions level but I'm unable to make the plugin save a new version by itself. It ask wether I'd like to save as new version level or not, but never saves a new version either I press yes or no.
        3 - Selecting from either list or model is now working perfectly, just like outliner.
        4 - There is a feature that is not working as I would expect too. If one refreshes the list by whatever reason it collapses (some commands also refresh it). You loose the context on the list you were on. Of course it's easy now to choose from model so this is just a minor question.

        Best regards. I hope this helps,

        JQL

        www.casca.pt
        Visit us on facebook!

        1 Reply Last reply Reply Quote 0
        • O Offline
          Oxer
          last edited by 14 Jan 2014, 18:27

          On Mac when Sketchup runs it appears a Ruby Console Error:

          %(#FF0000)[Error al cargar archivo /Users/Oxer/Library/Application Support/SketchUp 2013/SketchUp/Plugins/BGSketchup/Composants/Rb/Composants_Main.rb
          Permission denied - /Users/Oxer\BGSketchup_Composants.ini
          Error al cargar archivo BGSketchup_Composants.rb
          Permission denied - /Users/Oxer\BGSketchup_Composants.ini]

          The BGSketchup_Composants.ini file doesn't exist in that path, i have complete privilegies for Plugins folder.

          "The result is the end what is important is the process" by Oxer
          [http://www.oxervision.blogspot.com/(http://www.oxervision.blogspot.com/)]

          1 Reply Last reply Reply Quote 0
          • O Offline
            Oxer
            last edited by 14 Jan 2014, 18:47

            I have added the spanish language to Localization.rb file.

            Spanish Language added

            "The result is the end what is important is the process" by Oxer
            [http://www.oxervision.blogspot.com/(http://www.oxervision.blogspot.com/)]

            1 Reply Last reply Reply Quote 0
            • I Offline
              inteloide
              last edited by 14 Jan 2014, 22:54

              Hello,

              As every day, just post an update, with following corrections :
              Corrected : When clicking on component in model, the information were not displayed.
              Corrected : Revision system now working
              Corrected : Bug when clicking on a group in the model (doesn't block user)
              Corrected : Attempt to solve Mac file issue
              Added : Spanish language, thanks to Oxer

              JQL, this solve points 2 and 3. For your point 1, note that Sketchup force the file to be a ".skp" when saving component...No way to solve this...
              About point 4 : it could be complex...I will try (I stack this with the filters for the list ;o)

              Oxer : thank yoiu for translation !
              About your issue on Mac, I make a correction that may solve your issue. I saw that the "/" and "" were different on your message. as windows reconize both, I force the string to be with "/". I guess it solve the problem...Please keep me informed !

              Note also that I release the first help file (at least !!!). Hope you will love it !!! πŸ˜‰

              bye !

              Humanity will do a huge step when the IT professionals will understand that computers are tools...

              1 Reply Last reply Reply Quote 0
              • O Offline
                Oxer
                last edited by 15 Jan 2014, 02:04

                Thanks for the update but it appears the same message in Ruby Console:

                %(#FF0000)[Error al cargar archivo /Users/Oxer/Library/Application Support/SketchUp 2013/SketchUp/Plugins/BGSketchup/Composants/Rb/Composants_Main.rb
                Permission denied - /Users/Oxer\BGSketchup_Composants.ini
                Error al cargar archivo BGSketchup_Composants.rb
                Permission denied - /Users/Oxer\BGSketchup_Composants.ini]

                "The result is the end what is important is the process" by Oxer
                [http://www.oxervision.blogspot.com/(http://www.oxervision.blogspot.com/)]

                1 Reply Last reply Reply Quote 0
                • I Offline
                  inteloide
                  last edited by 15 Jan 2014, 06:41

                  @oxer said:

                  Thanks for the update but it appears the same message in Ruby Console:

                  %(#FF0000)[Error al cargar archivo /Users/Oxer/Library/Application Support/SketchUp 2013/SketchUp/Plugins/BGSketchup/Composants/Rb/Composants_Main.rb
                  Permission denied - /Users/Oxer\BGSketchup_Composants.ini
                  Error al cargar archivo BGSketchup_Composants.rb
                  Permission denied - /Users/Oxer\BGSketchup_Composants.ini]

                  Hello Oxer,

                  could you please post the complete error message ? To which line produce this bug ?
                  thank you !

                  Humanity will do a huge step when the IT professionals will understand that computers are tools...

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    TIG Moderator
                    last edited by 15 Jan 2014, 10:35

                    The answer is in the text πŸ˜’
                    /Users/Oxer****\****BGSketchup_Composants.ini
                    The backslash \ will only work as a file separator character on PCs, NOT MACs !
                    A / works on both platforms.
                    You should use File.join(directorypath, filename) to avoid this issue.
                    Also you can use .tr!("\\","/") to fix it.
                    [Conversely, on PC if you ever want to pass a path to say a "cmd" use .tr!("/","\\") as DOS always expects \ !]

                    On PC AND on MAC this will work:
                    /Users/Oxer****/****BGSketchup_Composants.ini

                    Change the code from:
                    file_name=BGSketchup_my_documents_dir()+"\\BGSketchup_Composants.ini"
                    to
                    file_name=Fiile.join(BGSketchup_my_documents_dir(), "BGSketchup_Composants.ini")
                    which avoids the \...

                    Incidentally don't set def methods with uppercase first letter:
                    BGSketchup_my_documents_dir() NO 😞
                    bgSketchup_my_documents_dir() YES πŸ˜„
                    Although a method named ' getTempFolder()' would be more logical*** ??

                    ***Writing this ini file to that user-location is also somewhat ill-advised ?
                    Why not put it into a 'Temp folder' - this varies between PC and MAC...
                    ENV['TEMP'] || ENV['TMPDIR']
                    if !(mac) ... return path.strip.gsub("\000","") else #On Mac return File.expand_path "~" end
                    could simply be:
                    return ENV['TEMP'] || ENV['TMPDIR']
                    On PC it gives:
                    C:\Users\UserName\AppData\Local\Temp
                    OR perhaps on PC [ruby:3kd2xg63]ENV['APPDATA'][/ruby:3kd2xg63] giving:
                    [ruby:3kd2xg63]C:\Users\UserName\AppData\Roaming[/ruby:3kd2xg63]
                    On MAC it's the user's hidden ..../T[emp] folder
                    Keeping it 'out of the way', and avoiding all of the '.so' rigmarole and odd locations for the .ini file...
                    πŸ€“

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • O Offline
                      Oxer
                      last edited by 15 Jan 2014, 15:54

                      How TIG says, the answer is in the text, all red text is the Error Message.
                      Thanks TIG for the explanation, i don't know the ruby code. πŸ‘

                      "The result is the end what is important is the process" by Oxer
                      [http://www.oxervision.blogspot.com/(http://www.oxervision.blogspot.com/)]

                      1 Reply Last reply Reply Quote 0
                      • I Offline
                        inteloide
                        last edited by 15 Jan 2014, 19:17

                        Hello,

                        Thank you TIG for your help.
                        Your code is so much simple than mine...I changed to yours.

                        New version (1.9.4) solve only this error.

                        Humanity will do a huge step when the IT professionals will understand that computers are tools...

                        1 Reply Last reply Reply Quote 0
                        • I Offline
                          inteloide
                          last edited by 15 Jan 2014, 22:00

                          Version 1.9.5 :
                          Corrected : When saving all definitions, it asks now to save also file without link.
                          Optimzed : Now, for revision management, file with letter after revision level and accepted "toto rev 3 (super").skp"

                          Oxer, any feedback as a MAC user ?

                          I will officially post this version tomorrow if no bugs are found.

                          In parrallel I will look for JQL request but won't post new version (I think too much version make confusion...)

                          Humanity will do a huge step when the IT professionals will understand that computers are tools...

                          1 Reply Last reply Reply Quote 0
                          • O Offline
                            Oxer
                            last edited by 16 Jan 2014, 13:40

                            Image 4
                            Image 5

                            "The result is the end what is important is the process" by Oxer
                            [http://www.oxervision.blogspot.com/(http://www.oxervision.blogspot.com/)]

                            1 Reply Last reply Reply Quote 0
                            • O Offline
                              Oxer
                              last edited by 16 Jan 2014, 13:45

                              Now, there isn't Console Error when you open Sketchup, the settings window appears, the plugin generates the BGSketchup_Composants.ini file in Temporal folder, the translation works but the there are some problems:

                              1. The list is empty, when you push Update List button, nothing happens, no error in Ruby Console.
                              2. If you push Reload All Components button, it appears an error in Ruby Console, see the image 2.
                              3. If you push Save All Components button, it appears a first pop up window (image 3), i push Yes button and it appears a second empty pop up window (image 4), i push yes and it appears a Ruby Console Error (image 5).

                              Image 2
                              Image 3

                              "The result is the end what is important is the process" by Oxer
                              [http://www.oxervision.blogspot.com/(http://www.oxervision.blogspot.com/)]

                              1 Reply Last reply Reply Quote 0
                              • T Offline
                                TIG Moderator
                                last edited by 16 Jan 2014, 14:26

                                That ' nil' error points to code at line #494 of the script Composants_Main.rb - which reads:
                                UI.messagebox @strNbEnregistementDefinitions+" ("+compteur_ok.to_s+"/"+compteur.to_s+")"
                                So presumably a part of it is actually ' nil' ?
                                @strNbEnregistementDefinitions is set elsewhere in the script Localization.rb.
                                This is set from a series of ' if/elsif' tests, BUT ill-advisedly there is no 'fall-back' ' else' when nothing matches the other tests - so then it can return ' nil', and thereby cause the error - because a ' nil' object can't be used as part of a text string!

                                Perhaps change the code to read...
                                @strNbEnregistementDefinitions='?' unless @strNbEnregistementDefinitions UI.messagebox(@strNbEnregistementDefinitions+" ("+compteur_ok.to_s+"/"+compteur.to_s+")")

                                OR have a proper ' else' fall-back in the Localization.rb tests section...

                                The other two methods used in compiling the remainder of the string should always safely return a string as they start off as 0 - giving '... (1/2)' etc...

                                TIG

                                1 Reply Last reply Reply Quote 0
                                • I Offline
                                  inteloide
                                  last edited by 16 Jan 2014, 18:13

                                  @tig said:

                                  This is set from a series of ' if/elsif' tests, BUT ill-advisedly there is no 'fall-back' ' else' when nothing matches the other tests - so then it can return ' nil', and thereby cause the error - because a ' nil' object can't be used as part of a text string!

                                  This could be due to a missing tranlsation in string (a string not defined in one language). Therefore, I change the way of working on Localisation.rb :
                                  1-I load all strings in English
                                  2-I load the strings in the wanted language.
                                  This means that if a string is not translated, the string will be defined with English value.

                                  The key thing, for me, is to always have strings defined in English, at minimal.

                                  Humanity will do a huge step when the IT professionals will understand that computers are tools...

                                  1 Reply Last reply Reply Quote 0
                                  • I Offline
                                    inteloide
                                    last edited by 16 Jan 2014, 19:16

                                    @oxer said:

                                    1. If you push Reload All Components button, it appears an error in Ruby Console, see the image 2.

                                    Please try version 1.9.6 below, which should solve this issue.

                                    @oxer said:

                                    1. The list is empty, when you push Update List button, nothing happens, no error in Ruby Console.

                                    That's strange...maybe a javascript error...let's try with version 1.9.6, it may solve the issue.


                                    Version 1.9.6

                                    Humanity will do a huge step when the IT professionals will understand that computers are tools...

                                    1 Reply Last reply Reply Quote 0
                                    • O Offline
                                      Oxer
                                      last edited by 16 Jan 2014, 19:30

                                      Ok, i'll test it.

                                      "The result is the end what is important is the process" by Oxer
                                      [http://www.oxervision.blogspot.com/(http://www.oxervision.blogspot.com/)]

                                      1 Reply Last reply Reply Quote 0
                                      • O Offline
                                        Oxer
                                        last edited by 16 Jan 2014, 20:20

                                        The list continues empty 😞
                                        I'll test the other functions

                                        "The result is the end what is important is the process" by Oxer
                                        [http://www.oxervision.blogspot.com/(http://www.oxervision.blogspot.com/)]

                                        1 Reply Last reply Reply Quote 0
                                        • O Offline
                                          Oxer
                                          last edited by 16 Jan 2014, 20:32

                                          • Modify file's path -->works
                                          • Save selected component -->works
                                          • Save all components -->works
                                          • Save with new revision level -->works
                                          • Reload selected component -- > doesn't work, when you select the component it appears "Saved file is newer!" message but when i push Reload selected component button nothing happens, see the image below.

                                          Reload component.jpg

                                          "The result is the end what is important is the process" by Oxer
                                          [http://www.oxervision.blogspot.com/(http://www.oxervision.blogspot.com/)]

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 5
                                          • 6
                                          • 7
                                          • 8
                                          • 4 / 8
                                          4 / 8
                                          • First post
                                            65/156
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement