option to right click on layer and get is path. Like site::building::pointcloud
Hi CRZ_06
try this Python
import rhinoscriptsyntax as rs
import scriptcontext as sc
objID=rs.GetObject()
obj=sc.doc.Objects.Find(objID)
layer_index=obj.Attributes.LayerIndex
full_name=sc.doc.Layers[layer_index].FullPath
print full_name
2 Likes
Iām using this script to copy the layer path into clipboard.
I can then paste it in Grasshopper and use it to query model objects which are on that layer.
#! python3
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select object",preselect=True)
layer = rs.ObjectLayer(obj)
print(layer)
rs.ClipboardText('"'+layer)
ObjectLayerClipboard.py (166 Bytes)
thanks guys
1 Like