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…
- The #depth method
- The #height method
- The #width method
of Geom::BoundingBox of the definition
considering the ComponentInstance #transformation (how the instance placed, and scaled in a model)
to get its length ( whatever its mean)
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.
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…