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

      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
                  • Dave RD Offline
                    Dave R
                    last edited by

                    TIG, this version now puts the CSV files in the same location as the SKP file. πŸ‘ πŸ‘

                    Excellent work. Thank you sir.

                    Etaoin Shrdlu

                    %

                    (THERE'S NO PLACE LIKE)

                    G28 X0.0 Y0.0 Z0.0

                    M30

                    %

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

                      Results:

                      $LOAD_PATH
                      ["/Library/Application Support/Google SketchUp 8/SketchUp/Plugins", "/Library/Application Support/Google SketchUp 8/SketchUp/Tools"]

                      The version I had downloaded was the "++" version. I was trying different locations for the file in case it was a location issue (really just shooting in the dark). I tried locating the file in the "documents" folder, same result.

                      I removed the "++" version and replaced with the "+" version, located the model file in the "documents" folder -- everything worked fine. CSV files were placed in the same folder as the model file.

                      A couple of dumb questions: SKP file is a sketchup model file? And SKP is the same as a model file?

                      A little embarrassing -- I'm very new to a Mac (1 month). I've been a Windows user for forever and work with some high end modeling software on a daily basis (ProEngineer, CATIA). I'm still trying to get a handle on file locations, permissions, read/write, etc. with the Mac. I was looking for a way to create components (pieces, part), create assemblies from them and generate a bill of material (BOM) of the parts (components). I think the cutlist would take the additional step of fitting the models to boards or sheet goods (?) -- which may be my next step.

                      Anyway, I'll give it a go. Very appreciative for all the help.

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

                        Brian, it sounds like you now have TIGs latest version working which is good.

                        As to your question about the SKP file, yes, SKP is used to refer to the SketchUp model file. That's because the file extension is .skp.

                        The CutList plugin I was referring to will generate a BOM and can sort into wood, sheet materials and parts when the model is properly set up. Take a look at this link for some details. The plugin will also generate files to be imported into CutList Plus which can do sheet goods optimization.

                        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

                          I've checked and both of the + and ++ versions now work fine on PC & MAC...

                          TIG

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

                            Guys, thanks again for the help. Dave -- will CutList work on the free version of SketchUP?

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

                              Yes. It will work on the free version.

                              Etaoin Shrdlu

                              %

                              (THERE'S NO PLACE LIKE)

                              G28 X0.0 Y0.0 Z0.0

                              M30

                              %

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

                                Question for Dave -- I've looked into the Cut List program, works well. Is there any way to create or edit for custom board sizes, say over 12'? Thanks.

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

                                  At the moment, no. The author has it planned to add that feature into a future version, though. Since he has a day job and a life ( I wonder what that's like. 🀣 ) we'll likely have to wait a little bit.

                                  Etaoin Shrdlu

                                  %

                                  (THERE'S NO PLACE LIKE)

                                  G28 X0.0 Y0.0 Z0.0

                                  M30

                                  %

                                  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