algorithmic modeling for Rhino
This is more of a Python scripting question as I am not working in the Grasshopper environment but I thought that someone on this forum might know the answer.
I have a script(part of which follows) :
rs.AddLayer("TEMP FRIT")
rs.CurrentLayer("TEMP FRIT")
for i in range(0,num_of_frit_types):
temp_block = rs.InsertBlock(block_names[i],[-1000,-1000,0])
temp_surfaces = rs.ExplodeBlockInstance(temp_block)
temp_area = 0
for item in temp_surfaces:
rs.ObjectLayer(item,"TEMP_FRIT")
temp_area += rs.SurfaceArea(item)[0]
frit_percent_dict[block_names[i]] = temp_area
It creates a new layer "TEMP FRIT" but does not place the item on the layer and I get this error message.
Message: TEMP_FRIT does not exist in LayerTable
Thanks
Jon
Tags:
Hi Jon,
you used an underscore while assigning the layer, should be:
rs.ObjectLayer(item,"TEMP FRIT")
Well that's embarrassing!
Thanks.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by