# Material Take Off using Ruby

**URL:** <https://forums.sketchup.com/t/material-take-off-using-ruby/254132>\
**Category:** Ruby API\
**Tags:** ruby, generate\_report\
**Created:** [January 4, 2024, 1:36pm UTC](https://forums.sketchup.com/t/material-take-off-using-ruby/254132 "2024-01-04T13:36:05Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![tks](https://avatars.discourse-cdn.com/v4/letter/t/e99b99/32.png) [@tks](https://forums.sketchup.com/u/tks)\
**Post date:** [January 5, 2024, 8:03am UTC](https://forums.sketchup.com/t/material-take-off-using-ruby/254132/4 "2024-01-05T08:03:43Z")

</div>

Thanks for your response @DanRathbun, I’ve tried to answer the best I can do for what you wanted to know. In case there’s anything else to be known, please let me know.

> [@DanRathbun](#):
>
> We do **not** know what the report options are that you are using.
> 
> I suspect that the report is only set to a certain number of levels, whereas your script counts **all** definitions at **all** levels.

I’m using below sample template for report generation. If there’s any modifications required, kindly suggest me.

 ![image](https://global.discourse-cdn.com/sketchup/original/3X/c/b/cb3e99ecb785554e42f9344415e6b5b84bc14742.png)

 ![image](https://global.discourse-cdn.com/sketchup/original/3X/f/8/f8101167743308f74aba30142acb286177d15e3b.png)

You can refer to this link for the reference of forum discussion:

> [@DanRathbun](#):
>
> This is not actually true. The old “offline” report engine can be fired by a ruby call.
> 
> What is the forum topic you are referring to?

[Generate report from Ruby API - Developers / Ruby API - SketchUp Community](https://forums.sketchup.com/t/generate-report-from-ruby-api/191235)

If there’s something I misunderstood, please let me know. It’ll help me to learn.

---

_[View the full topic](https://forums.sketchup.com/t/material-take-off-using-ruby/254132)._
