Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
Ruby Question
-
If I select a component and then start a script how can I find out what layer the selected component is on? I have looked at the ruby help and several script samples but could not find how to do this.
Keith
-
Assuming you only have one component selected:
Sketchup.active_model.selection[0].layer -
I added .name (Sketchup.active_model.selection[0].layer.name) and got exactly what I needed.
Thanks
Keith
Advertisement