I am trying to set the object name of a mesh to the name of the file as part of a workflow. I thought I had it with the below script, but the OBJ name is not set to the file name, but just to “m” in any file I try.
import rhinoscriptsyntax as rs
def ObjNamefromFile():
Docs=rs.DocumentName()
for Name in Docs:
objs=rs.ObjectsByType(32, True)
rs.ObjectName(objs,Name)
ObjNamefromFile()
3 posts - 2 participants