In setting up a function to read all the layers from a file via Rhino.FileIO -
I am trying to understand why this works:
import Rhino
path=r"C:\Users\Mitch\Desktop\ReadLayerTest.3dm"
file=Rhino.FileIO.File3dm.Read(path)
all_layers=file.AllLayers
– but this doesn’t:
import Rhino
path=r"C:\Users\Mitch\Desktop\ReadLayerTest.3dm"
layer_filt=Rhino.FileIO.File3dm.TableTypeFilter.Layer
obj_filt=Rhino.FileIO.File3dm.ObjectTypeFilter.None
file=Rhino.FileIO.File3dm.Read(path,layer_filt,obj_filt)
all_layers=file.AllLayers
Aren’t the optional arguments supposed to allow one to only read certain elements/tables from a file?
Or did I misunderstand how this is supposed to be used?