Ruby help !
-
hi all !
I try to answer to this post.the code, logically, is not hard. But I have a strange problem. It's a ruby bug, in my opinion ; and I would like to know how the ruby masters can solve this
Here are some attempts to show the problem.
Procedure of the script :
1- Explodes all components and groups
2- Groups all entities by layer.When I select some entities, "Bryce" included, I have this error :
@unknownuser said:
Error: #<ArgumentError: C:\Program Files\Google\Google SketchUp 6\Plugins\groupByLayer.rb:67:in `add_group': All Entities must have a common parent>
C:\Program Files\Google\Google SketchUp 6\Plugins\groupByLayer.rb:67On line 77, I have this :
model.active_entities.add_group(sel)
When I select some entities, but without "Bryce", the program runs completely !!
So I added a line can show all entity that is not parent to the model, in my code :
puts ee if ee.parent != model
When I try with or without "Bryce", plenty of entities are written in the ruby window ! (2)
Finally, I tried to erase the line which groups the selection.
And finally, no entities written in the ruby window, and the script runs completely (3)Straaaange !!!!
So in my opinion, it's the add_group line which bugs my script !!!
Can you help me please ??? I don't understand ???Sniff...
-
I think there is a problem with Bryce. At first I was thinking about a problem with faces oriented components, but it's not true. Just Bryce !! Kiiiiill Bryyyyce
So I erased bryce form the selection, and the code works.
Advertisement