Once I've been able to extract all of the data I need during my interrogation of all the groups, is it possible to export these variables into a separate text file? Or does the Ruby environment within SketchUp prefer the user to stay within SketchUp?
Posts
-
RE: Interrogating each group to find Cylinders & Cubes
-
RE: Interrogating each group to find Cylinders & Cubes
Thank you so much for that. You went to a lot of trouble for me and I appreciate it. I think it'll take me some time to get my head around it but for me it's a good introduction to Ruby.
-
Interrogating each group to find Cylinders & Cubes
I'm new to script writing but I'm trying to write a Ruby script to complete a task I've been given at work. I have a skp file containing only separate groups (several hundred). Each group consists of EITHER a CYLINDER or a CUBOID. I'm trying to come up with a script that examines each group in turn and can judge whether the shape is a cylinder or a cuboid. If the shape turns out to be a cylinder, I need to extract the co-ordinates of the face centre, the diameter of the circle and the length of the cylinder. If the group meets the criteria of a cuboid, I need the co-ords of the lower corner/vertex and the dimensions of the cuboid.
Also, I need to be able to export the above information into a text file.
Any tips or help would be gratefully appreciated. Or, a view on the achievability of what I'm trying to do would also be useful.
Thanks