How to count components in groups and export data

I’m designing houses with a building block that has multiple types of blocks. I’m making each course of blocks a component and would like to generate a report which accomplishes will display in this fashion:

Course 1
Component ‘A’ Count:
Component ‘B’ Count:
Component ‘C’ Count:

Course 2
Component ‘A’ Count:
Component ‘B’ Count:
Component ‘C’ Count:

Thanks to any help I can get on this!

What version of SketchUp are you actually using for this? Your profile indicates you are using the web-based SketchUp Free. Is that correct?

I should have said I’m using the Pro version, because I’m working with a designer who is using the Pro version. I’ll change that.

Thank you

So you should be using Pro, too, then.

And are you thinking of using the Report Generator in SketchUp Pro?

You can set this up in the Generate Report of SketchUp, but that specific layout can not be generated by that function alone.

You need to edit the .csv file or apply some html-magic in de .html output.

If you edit the report, take note of a few things:

What will be reported (whole model or selection)
What level is included

Model =level 0
Entities that are nested in level 1 G&C’s get level 2
etc.

Use the arrow to place selected attributes in the area below, use drag to put an attribute in the upper ‘Group by’ area.

In this case the Component Definition.

You can click on the settings behind each attribute to select totals.

If you insert the report in LayOut, you can make the final layout, there.

1 Like

It is somewhat cumbersome, and the link is not live (you need to Generate a new report, save and update the reference) but, to give an idea:

first one House is selected and then, set up the generate report:

Inside LayOut, you can insert them and fiddle with the CSV References Options (Note: I make copies of the inserted table):

With one house generated per time, you will need to insert the others, too:
(One could make a dummy and set up a scrapbook…)

Finishing touch:

The files:

Blockgenerator.zip (455.8 KB)

Oh, and ehm ‘don’t forget to subscrbe’. :smiley:

2 Likes

Thanks for the good thoughts on this. What I’ve come to understand with all ya’lls help is that I can accomplish what I want by generating a series of reports instead of one single report. Possibly there could be a way to run a single report, but if so that path has yet to be discovered.

This sketchup file is in progress; we’re working on identifying how to accomplish each facet of the project before completing each step, but here’s what it looks like at the moment:

To reiterate my hopes, I would have a report that listed each horizontal course, with a list of each type of block in each course. At the moment, the best I can do is make a report for each individual course and consolidate the information in the .csv

(also, yes, I’m using sketchup pro)

yes, I am. I was waiting to buy it myself until I was sure I could accomplish what I wanted with the software, and I’m happy to say that I now dedicated to sketchup pro, what promises to be a rewarding and highly addictive journey :wink:

1 Like

Hi I’m Dave and I’m addicted to SketchUp. :smiley: :smiley:

1 Like

I know this is an ancient thread, but it came up while I was googling for an answer for how to count selected objects. I wanted something quick and simple to count the number of objects in a group. You can do this in Extensions → Developer → Ruby Console and type:

model = Sketchup.active_model
selection = model.selection
selection.count

That will tell you how many objects are currently selected. It doesn’t do anything clever like traverse children in the group or anything but it’s quick!

That works, but entity info is much quicker for simple counts, knowing how much you have is not the same as exporting it.

1 Like

Oh yes, that is much quicker! :man_facepalming:

1 Like