@tig said:
@glro said:
@dedmin said:
http://rhin.crai.archi.fr/rubylibrarydepot/plugin_details.php?id=198
the text written by this plugin shows one line for each instance of a component
it doesn't make the total for each component
You never asked for that
your plugin "ComponentReporter++.rb" produces 3 text files:
*_CR-Component+Report.csv
*_CR-Instances+Report.csv
*_CR-Parentage+Report.csv
With the included example:
"essai_CR-Component+Report.csv":
DEFN-NAME,COUNT,DESCRIPTION,GUID
Composant#1,1,,29b53a7c-2e6c-40b9-9f78-41e4abc0a62f
Composant#2,1,,2306d93d-9156-46c9-bf4a-5a4e8a2f5e38
Composant#3,4,,c969203b-e788-468f-b495-5936ea9bdd48
As you can see, Composant#1 and Composant#2 are counted once only, when in reality, they appear 4 times in the model; the problem comes from the fact they are nested within Composant#3
If Composant#3 instances are exploded, Composant#1 and Composant#2 are counted 4 times, and it is what i am looking for.
But would be possible to get this result without exploding anything, using the information in your file "essai_CR-Parentage+Report.csv":
'essai_CR'<Model>,''Composant#3<Instance>,
'essai_CR'<Model>,''Composant#3<Instance>,
'essai_CR'<Model>,''Composant#3<Instance>,
'essai_CR'<Model>,''Composant#3<Instance>,
'essai_CR'<Model>,'Composant#3'<Definition>,''Composant#1<Instance>,
'essai_CR'<Model>,'Composant#3'<Definition>,''Composant#1<Instance>,
'essai_CR'<Model>,'Composant#3'<Definition>,''Composant#1<Instance>,
'essai_CR'<Model>,'Composant#3'<Definition>,''Composant#1<Instance>,
'essai_CR'<Model>,'Composant#3'<Definition>,''Composant#2<Instance>,
'essai_CR'<Model>,'Composant#3'<Definition>,''Composant#2<Instance>,
'essai_CR'<Model>,'Composant#3'<Definition>,''Composant#2<Instance>,
'essai_CR'<Model>,'Composant#3'<Definition>,''Composant#2<Instance>,
By counting the last definition instance of each line, and produce the result in a file like "essai_CR-Component+Report.csv"?
This is what sketchup does in the statistics windows, when you ask to developp for the component hierarchy, and it was my first question...
nested components example