• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] ComponentReporter++ v1.2

Scheduled Pinned Locked Moved Plugins
71 Posts 22 Posters 62.5k Views 22 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.
  • V Offline
    vmsremy66
    last edited by 12 Sept 2014, 13:33

    Hello TIG
    thank you for your time with this plugin.

    do you think it is possible to list dynamic components and their LenX, LenY, LenZ that are inside another dynamic component?

    1 Reply Last reply Reply Quote 0
    • V Offline
      vmsremy66
      last edited by 12 Sept 2014, 18:40

      sorry....

      1 Reply Last reply Reply Quote 0
      • T Offline
        TIG Moderator
        last edited by 12 Sept 2014, 22:11

        This is somewhat more complex...
        Why not post a similar request in the DC forum ?

        TIG

        1 Reply Last reply Reply Quote 0
        • M Offline
          maxim_
          last edited by 8 Oct 2014, 09:35

          Hi TIG, thanks for the plugin!
          Whether it is possible to copy the report in a clipboard? But only "Instances+Report"!
          It is sometimes better than the CSV file.


          1.jpg

          1 Reply Last reply Reply Quote 0
          • O Offline
            oceanembers
            last edited by 19 Nov 2014, 11:24

            Hi Tig, I'm trying to get this to work, reporting the components only if the dynamic attribute "report" is true. After a little experimentation, I think I should be changing line 135 to read

            	    inlist.push(c) if ((c.typename=="ComponentInstance") && (c.attribute_dictionaries['report'] == 'TRUE'))
            

            But that creates no results (I do have a DC in my model with the attribute 'report' set to 'TRUE')

            Could you point out where I'm going wrong?

            1 Reply Last reply Reply Quote 0
            • T Offline
              TIG Moderator
              last edited by 19 Nov 2014, 12:02

              Should you not be looking at the c.definition rather than the instance ?
              Also are you sure that's the attribute_dictionary name ?
              Perhaps ' dynamic_attributes' ??
              Try this Ruby Console snippet on a selected DC instance to see what I mean:
              Sketchup.active_model.selection[0].definition.attribute_dictionaries.each{|d|puts;p d.name;puts;d.each_pair{|k,v|puts"#{k} = #{v}"}}

              TIG

              1 Reply Last reply Reply Quote 0
              • O Offline
                oceanembers
                last edited by 19 Nov 2014, 13:56

                oh I see! I completely misunderstood attribute_dictionaries.

                		dict = c.attribute_dictionaries['dynamic_attributes']
                	    inlist.push(c) if ((c.typename=="ComponentInstance") && (dict['report'] == 1))
                

                This works great, thanks Tig.

                1 Reply Last reply Reply Quote 0
                • R Offline
                  rubenamaroh
                  last edited by 8 May 2015, 01:02

                  Hi TIG
                  About "ComponentReporter++.rb"
                  is theres some way the plugin including columns like Lenght X, Lenght y and Lenght Z of the box ?:
                  im new in rubys, sorry. 😞

                  DEFN-NAME | COUNT | DESCRIPTION | X | Y | Z| GUID |

                  Any help i will apreciate. πŸ˜„

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    TIG Moderator
                    last edited by 8 May 2015, 09:07

                    @rubenamaroh said:

                    Hi TIG
                    About "ComponentReporter++.rb"
                    is theres some way the plugin including columns like Lenght X, Lenght y and Lenght Z of the box ?:
                    im new in rubys, sorry. 😞

                    DEFN-NAME | COUNT | DESCRIPTION | X | Y | Z| GUID |

                    Any help i will apreciate. πŸ˜„
                    Of course.
                    This is just an 'example' script.
                    Get the group/component-instance .bounds and get .width/height/depth [lenX/lenY/lenZ]
                    The add the extra columns into the CSV and include the three values .to_s etc...

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • R Offline
                      rubenamaroh
                      last edited by 9 May 2015, 22:10

                      @tig said:

                      @rubenamaroh said:

                      Hi TIG
                      About "ComponentReporter++.rb"
                      is theres some way the plugin including columns like Lenght X, Lenght y and Lenght Z of the box ?:
                      im new in rubys, sorry. 😞

                      DEFN-NAME | COUNT | DESCRIPTION | X | Y | Z| GUID |

                      Any help i will apreciate. πŸ˜„
                      Of course.
                      This is just an 'example' script.
                      Get the group/component-instance .bounds and get .width/height/depth [lenX/lenY/lenZ]
                      The add the extra columns into the CSV and include the three values .to_s etc...

                      Ok.
                      I will try to do it πŸ˜„
                      I was trying to make a list of material of framing walls but did not have the length of the studs and ledgers, i'm more familiar with the language of AutoLISP for AutoCAD, so I'm starting to learn the language of the rubys, any suggestions to learn ruby?
                      thanks.

                      1 Reply Last reply Reply Quote 0
                      • K Offline
                        katalikammello
                        last edited by 25 Sept 2015, 14:55

                        Is it possible to find and retrieve information from attributes in nested components?
                        ideally I would like to achieve a plugin like "TIG-exportDCs2csv[2].rb" that is able to Exports all Selected DCs' data into a file BUT FROM "NESTED" (or child) COMPONENTS AS WELL.
                        Anyone can help with this?

                        1 Reply Last reply Reply Quote 0
                        • sjdorstS Offline
                          sjdorst
                          last edited by 18 Jan 2016, 23:27

                          @Tig,

                          Can this plugin report current Attribute values AND formulas (if any) side by side?

                          If yes - Great!

                          If not, please consider this a suggested improvement, as well as a request for information - should you know of another plugin that provides this functionality.

                          Thanks in advance!

                          Steve

                          1 Reply Last reply Reply Quote 0
                          • A Offline
                            Ahmed0007
                            last edited by 27 Apr 2020, 22:10

                            Hi, TIG Thanks for this plugin.
                            can I get this (Please see attached image) information in one and a simple excel sheet?
                            Thanks again.


                            Capturdde.PNG

                            1 Reply Last reply Reply Quote 0
                            • T Offline
                              TIG Moderator
                              last edited by 28 Apr 2020, 09:42

                              This is old code.
                              It's for DCs only.
                              It was posted as an example, for you to edit as you wish.
                              To add a 'header' simply create the first line before the other rows.
                              Then adjust the units to report in feet and change the code to report the instance count rather than material...
                              So from line#40 change it to read like this:

                                  data=["Name#{sep}Width#{sep}Depth#{sep}Height#{sep}Quantity"]
                                  insts.each{|inst|
                                    defn=inst.definition
                                    name=defn.name.tr(sep, "_")
                                    lenx=defn.get_attribute("dynamic_attributes", "lenx", 0).to_f.to_feet.to_s
                                    leny=defn.get_attribute("dynamic_attributes", "leny", 0).to_f.to_feet.to_s
                                    lenz=defn.get_attribute("dynamic_attributes", "lenz", 0).to_f.to_feet.to_s
                                    quan=defn.instances.length.to_s
                                    dat = "#{name}#{sep}#{lenx}#{sep}#{leny}#{sep}#{lenz}#{sep}#{quan}"
                                    data << dat
                                  }
                              
                              

                              TIG

                              1 Reply Last reply Reply Quote 0
                              • A Offline
                                Ahmed0007
                                last edited by 30 Apr 2020, 01:50

                                @tig said:

                                This is old code.
                                It's for DCs only.
                                It was posted as an example, for you to edit as you wish.
                                To add a 'header' simply create the first line before the other rows.
                                Then adjust the units to report in feet and change the code to report the instance count rather than material...
                                So from line#40 change it to read like this:

                                    data=["Name#{sep}Width#{sep}Depth#{sep}Height#{sep}Quantity"]
                                >     insts.each{|inst|
                                >       defn=inst.definition
                                >       name=defn.name.tr(sep, "_")
                                >       lenx=defn.get_attribute("dynamic_attributes", "lenx", 0).to_f.to_feet.to_s
                                >       leny=defn.get_attribute("dynamic_attributes", "leny", 0).to_f.to_feet.to_s
                                >       lenz=defn.get_attribute("dynamic_attributes", "lenz", 0).to_f.to_feet.to_s
                                >       quan=defn.instances.length.to_s
                                >       dat = "#{name}#{sep}#{lenx}#{sep}#{leny}#{sep}#{lenz}#{sep}#{quan}"
                                >       data << dat
                                >     }
                                > 
                                

                                Thanks a lot this worked perfectly fine.

                                1 Reply Last reply Reply Quote 0
                                • Z Offline
                                  zoomanium
                                  last edited by 9 Jan 2021, 22:30

                                  Hi TIG, I stumbled on this plugin as the 2020 pro version generate report does not give the option of exporting the length of a welded curve as an option. I can see the length in the entity info when I click on a curve so I assume that data can be extracted. Do you know if this is possible to do? I started to study basic ruby but if this is not a possibility then I will just have to wait for sketchup pro to provide that in the future.

                                  1 Reply Last reply Reply Quote 0
                                  • M Offline
                                    mozarov
                                    last edited by 25 Sept 2021, 10:28

                                    Hi TIG, Thank you very much for the plugin. Is there a way to get all DCs reported within another DC?
                                    I've attached dynamic drawer model as an example. I'd like to get report of nested parts of a drawer.
                                    Thanks again.


                                    Dynamic drawer 210925.skp

                                    1 Reply Last reply Reply Quote 0
                                    • T Offline
                                      TIG Moderator
                                      last edited by 25 Sept 2021, 15:05

                                      If you edit the component-instance the nested instances should become accessible ?
                                      Then your reports will be based of the instances in each nested collection...

                                      TIG

                                      1 Reply Last reply Reply Quote 0
                                      • M Offline
                                        mozarov
                                        last edited by 27 Sept 2021, 12:32

                                        TIG thank you for quick answer. I have named component instances (ie right, left, bottom part etc.) inside dynamic drawer component but still get report of drawers outer dimensions only. I am trying to get report of inner parts of the drawer. Like your ComponentReporter++ cycles through all components and gives report of all components within other component. I would like to get same report of all mined nested DC parts of a DC drawer. Thanks again.

                                        1 Reply Last reply Reply Quote 0
                                        • M Offline
                                          mozarov
                                          last edited by 12 Feb 2022, 09:54

                                          Please help me out TIG. I am banging my head to a wall for months now. How to make your code cycle through nested DCs ant get their LenX, LenY, LenZ, other attributes to csv?
                                          Plaease help, I am stuck.


                                          Dynamic drawer 220210.skp

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

                                          Advertisement