How to get a length of an object using Ruby

Hello everyone,
I developped a specific object (kind of conveyor) and I’d like to get it’s length using Ruby.
I have many of those objects in my projects and I’d like to have the total length for all those objects.
Thank you in advance

You (we) need much more information than “specific object (kind of conveyor)”, to be able to deal with them in Ruby API.

For example: You can create such an object (whatever its mean) using Ruby code and you can already consider what will be the length of it which you need to totalize…

For example: If this object a SketchUp component, defined by the ComponentDefinition class, and instanced and reused multiple times throughout a model, you can use one, or combination of:

All in all, there are endless possibilities here with Ruby API and the best solution will depend on your current situation (task), which needs to be defined really precisely.

Hello mate,

thank you much for your reply. Finally I found an easier way to do it using “Generate report” feature.
Thanks a lot

You are welcome!
Actually “Generate report” will do similar things as my second example… :wink: