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

    [Plugin] ComponentReporter+.rb

    Scheduled Pinned Locked Moved Plugins
    44 Posts 11 Posters 25.1k Views 11 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.
    • TIGT Offline
      TIG Moderator
      last edited by

      @buildermax said:

      Hi, TIG

      Thanks for your time and advice but I am not very confident to deal with programming stuff. I prefer to edit the data in excel like the way you suggest, while waiting for the next version. I hope it could be more interactive and controllable.

      By the way, to delete tilde ~ (along with some other symbols) by Find and Replace function of MS Excel, a ~ must be added in the selection field first, making it ~~, ~*, and etc.

      Regards

      I wasn't suggesting you used Find+Replace in Excel itself. If you double-click the file icon it will open in Excel, BUT if you open the file using the right-click context-menu 'Open with...', and select NotePad.exe and use the easier Find+Replace there, then save, the file is changed and when you open it in Excel they'll be no 'mm' or '~'. A 'csv' file is NOT a special Excel format, it's written in simple text with commas separated variables ("CSV"), it can most easily be edited with a text editor... However, Excel IS the default program to open csv files when you double-click since they are a special way of getting data out of one application into Excel without the hassle of binary encoding the fields (.tsv is similar = 'tab-separated-variables') !!! I thought you might be a bit wary of coding ! πŸ˜„ However, why not try it on a copy of the file... you'll be proud you did it πŸ˜› - stand up and be a man ! πŸ˜‰

      TIG

      1 Reply Last reply Reply Quote 0
      • W Offline
        Walter S. Arnold
        last edited by

        Bump of an old thread, but I want give thanks for this plugin; it really came in handy today.

        1 Reply Last reply Reply Quote 0
        • C Offline
          clayc54
          last edited by

          Hi

          im using component reporter and im getting some strange behaviour.

          i open a new file, drag in a component. do a report. it shows the component. i then add another component with nested components within. do another report. all good.

          when i delete the first component and then do a report, all reports show the deletion except the component+report.csv. its appearing to have a memory.

          has anyone else experienced this?

          1 Reply Last reply Reply Quote 0
          • TIGT Offline
            TIG Moderator
            last edited by

            There is a newer '..++' version that might avoid this ?

            TIG

            1 Reply Last reply Reply Quote 0
            • C Offline
              clayc54
              last edited by

              thanks for the reply.

              is the ++ version you are talking about v1.6?

              i think that is the version i am using.

              i just downloaded it from one of your forum posts.

              1 Reply Last reply Reply Quote 0
              • TIGT Offline
                TIG Moderator
                last edited by

                No the '++' version is only at v1.1 here it is...ComponentReporter++.rb
                but v1.6 is the latest in the '+' version...

                TIG

                1 Reply Last reply Reply Quote 0
                • C Offline
                  clayc54
                  last edited by

                  thanks for your help

                  i tried the ++ version and it does the same thing.

                  if i put components in the drawing and then run a report it shows those components in all the CSVs. i then delete all the components in the drawing and add different components. save the file. when i now run the report, component+report.csv adds the new components to the deleted ones, it doesnt delete the components that arent in the drawing anymore. however both parentage and instances CSVs show the correct components.

                  can anyone else test this scenario on their systems so i can be sure its not something quirky to my system?

                  also wondering, what is the difference between + and ++ for componentreporter.

                  just wanted to say that, other than that small hickup, this is an amazing plugin for me as im trying to draw garden designs for community groups. i have all my irrigation components tracked by this plugin. cheers

                  1 Reply Last reply Reply Quote 0
                  • pyrolunaP Offline
                    pyroluna
                    last edited by

                    Hey TIG

                    thanks for the great plugin

                    however I discoverd a little bug
                    if I have an ΓΆ in the folder name, the plugin tells me that the file I want to write to is in use.
                    This is true for the + version and the ++ version

                    Pyro

                    1 Reply Last reply Reply Quote 0
                    • TIGT Offline
                      TIG Moderator
                      last edited by

                      This isn't an error - it's a known limitation of the version of Ruby used by Sketchup.
                      File paths or file-names containing special characters - like accented letters - cause many 'File' operations to fail.
                      So you should avoid them because otherwise they will cause file-writing errors or tests for files existing etc to fail.
                      The reporters' trap for a fail, but assume that the fail is because the file is open, as that's the common cause... πŸ˜•

                      TIG

                      1 Reply Last reply Reply Quote 0
                      • pyrolunaP Offline
                        pyroluna
                        last edited by

                        ah okay, my bad. Didn't know that. I'll take more care naming my folders in the future πŸ˜„

                        1 Reply Last reply Reply Quote 0
                        • M Offline
                          MustangSK
                          last edited by

                          First post so apologies if I'm in the wrong spot or otherwise. I'm working with the free version of Sketchup for some woodworking projects. I've created components and would like to print out a list and quantities of these. I've downloaded ComponentReporter ++ for this and have run into an error -- I keep getting the "file already open" error. I've checked the folder names, no odd characters. Any guidance would be appreciated. Thanks.

                          1 Reply Last reply Reply Quote 0
                          • TIGT Offline
                            TIG Moderator
                            last edited by

                            @mustangsk said:

                            First post so apologies if I'm in the wrong spot or otherwise. I'm working with the free version of Sketchup for some woodworking projects. I've created components and would like to print out a list and quantities of these. I've downloaded ComponentReporter ++ for this and have run into an error -- I keep getting the "file already open" error. I've checked the folder names, no odd characters. Any guidance would be appreciated. Thanks.
                            The code tries to make [or 'open'] the CSV file in the same folder as the original SKP, so that it can write the data. If it fails to do this you get the message telling you... The most common reason for the failure is that you have the CSV file already open in Excel. This locks it and prevents anything else writing data to the file - hence the message. Closing the 'open' CSV and then retrying to use it should allow the operation to complete. Another possibility is that the SKP name and/or folder-path contain some non-standard characters [like a 'Γ©' or 'Γ§'] - the version of Ruby shipped with SketchUp can't cope with these in file/folder paths in its 'File' methods...
                            Another possibility is that the folder containing the SKP has limited security settings and the system is preventing you from writing the new CSV into it ?? Check/change its settings to 'FULL' in its icon's Properties > Security > Edit dialog...
                            Also what is the exact SKP file's name/path and the file/folder-path reported in the error message?

                            TIG

                            1 Reply Last reply Reply Quote 0
                            • M Offline
                              MustangSK
                              last edited by

                              I'm running on Mac OSX (just switched from Windows, so I'm struggling with that). This if the first time I've used the plugin -- no csv files open in Excel. The path on the dialog window is:/component test-Component+Report.csv
                              Thought this might be due to running the free version? I'll check the security setting in the window (need to figure that out first on the Mac). I appreciate the quick reply and help.

                              1 Reply Last reply Reply Quote 0
                              • TIGT Offline
                                TIG Moderator
                                last edited by

                                Have you saved the model before trying to do this ?
                                It should use the model's path as the folder for the CSV file...
                                ":/component test-Component+Report.csv"
                                Doesn't seem right to me ???
                                I doubt you have unfettered access-rights to the root-directory ?
                                If you open this SKP and copy+paste + <enter> this into the Ruby Console what do you get ?
                                m=Sketchup.active_model;p m.title;p File.dirname(m.path);
                                It should be
                                "component test"
                                then a full path to the folder that contains the SKP ?
                                This should also used for the CSV file's folder-path...
                                Do you have full-rights to that folder?

                                Can you also put these two lines into the Ruby Console separately and post the paths...
                                Sketchup.find_support_file('plugins')
                                and then
                                Sketchup.find_support_file('ocean_extension.rb', 'plugins')

                                Also this to check where Sketchup is actually installed...
                                Sketchup.find_support_file('.')
                                and then this
                                Dir.pwd

                                πŸ˜•

                                TIG

                                1 Reply Last reply Reply Quote 0
                                • M Offline
                                  MustangSK
                                  last edited by

                                  Result of the first:

                                  m=Sketchup.active_model;p m.title;p File.dirname(m.path);
                                  "component test"
                                  "/Applications/Google SketchUp 8/Models"
                                  nil

                                  Result of the second:

                                  Sketchup.find_support_file('plugins')
                                  /Library/Application Support/Google SketchUp 8/SketchUp/plugins

                                  Result of the third:

                                  Sketchup.find_support_file('ocean_extension.rb', 'plugins')
                                  /Library/Application Support/Google SketchUp 8/SketchUp/plugins/ocean_extension.rb

                                  Result of the fourth:

                                  Sketchup.find_support_file('.')
                                  /Users/briancurry/Library/Application Support/Google SketchUp 8/SketchUp/.

                                  Result of the fifth:

                                  Dir.pwd
                                  /

                                  Hope this help. Appreciate all the help.

                                  1 Reply Last reply Reply Quote 0
                                  • TIGT Offline
                                    TIG Moderator
                                    last edited by

                                    πŸ˜•
                                    Next one into the Ruby Console:
                                    $LOAD_PATH
                                    exactly as written...

                                    TIG

                                    1 Reply Last reply Reply Quote 0
                                    • Dave RD Offline
                                      Dave R
                                      last edited by

                                      Brian, where is the SKP file you're trying to run the component report on? It appears it is in the Applications folder. What happens if you try running it on a model that is saved in Documents? I did that on my Mac and it works just fine. Perhaps the plugin can't write to the folder where the Component Test file is.

                                      FWIW, I use a plugin specifically designed for woodworking for this. Still, you should be able to get this to work.

                                      Edit: I was in a rush getting ready for work when I tested this. I didn't look as closely as I should have at where the files ended up. They ended up in the wrong location and on Mountain Lion I expect the location is not accessible by the plugin.

                                      CompRep.png

                                      Curious.

                                      Etaoin Shrdlu

                                      %

                                      (THERE'S NO PLACE LIKE)

                                      G28 X0.0 Y0.0 Z0.0

                                      M30

                                      %

                                      1 Reply Last reply Reply Quote 0
                                      • TIGT Offline
                                        TIG Moderator
                                        last edited by

                                        Thanks Dave...

                                        I was going to suggest something else like 'CutLister' etc and get you involved...

                                        BUT we do need to sort out his setup and usage first...
                                        If anything the model SKP files ought to be in subfolders inside the Models folder...
                                        Most users would have them in that file path at all ???

                                        TIG

                                        1 Reply Last reply Reply Quote 0
                                        • Dave RD Offline
                                          Dave R
                                          last edited by

                                          On my Mac most of the SKP files I create are stored in the Documents folder. The only ones that end up in applications are local component files for the Components browser. Those are saved there by dragging from In Model to the local collection in the Components browser. I'm guessing that with Mountain Lion, that directory is not accessible in the way it needs to be for Component Reporter to write to it. We see this all the time with the Plugins folder. It seems to need permissions changed from Read Only to Read & Write.

                                          Brian, if you are keeping your models in the Applications folder, I would suggest you don't do that.

                                          Etaoin Shrdlu

                                          %

                                          (THERE'S NO PLACE LIKE)

                                          G28 X0.0 Y0.0 Z0.0

                                          M30

                                          %

                                          1 Reply Last reply Reply Quote 0
                                          • TIGT Offline
                                            TIG Moderator
                                            last edited by

                                            This tool is 7 years old - I only just noted that you aren't trying the current version...
                                            As noted in earlier posts in this thread there is now ComponentReporter++.rb.
                                            This '+' tool had issues with MACs and was effectively replaced by the '++' version.
                                            However, here is a '+' version [v1.7] that is MAC friendly !
                                            PayPalButton


                                            ComponentReporter+.rb

                                            TIG

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 2 / 3
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement