💡 LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering
Download Trial
Getting ComponentInstance position
-
Hey
How can I get the position of some ComponentInstance (which appear in the model) by the ruby?
thank a lot
-
Look up transformation in API...
http://download.sketchup.com/sketchuphelp/gsu6_ruby/Docs/Ruby-ComponentInstance.html#transformation
-
I did read tha API transformation, but still cant get how exactly can I get the position
Assume I want to draw an edge from the (o,o,o) Point to the component position, what should I type in the ruby?
thank a lot
-
Something like this...
comp_instance = (Sketchup.active_model.entities.select{ |e| e.typename == "ComponentInstance"}).first Sketchup.active_model.entities.add_edges( ORIGIN, comp_instance.transformation.origin )
Advertisement