Regression python-rhino3dm working with layers

between 8.6.1 and 8.9.0 rhino3dm loosing his ability to show layers inside a file tested with a old rhino5 and a newer rhino7 file with python 3.13 on an linux system.

Code:

#!/usr/bin/env python
from rhino3dm import *

path = "/home/xxx/atelierkirchhof_cloud/atelierkirchhof/Aufträge/Vorlage/Vorlage.3dm"
model = File3dm.Read(path)
print(model.ArchiveVersion)
print(len(model.Layers))

Output rhino3dm 8.6.1:

70
33

Output rhino3dm 8.9.0:

70
0

i also tested the beta release 8.15.0b0 with showing “0” too.

Thanks for reporting this. I’ll look into what changed to cause this.

I’ve added a test to verify that this is working as expected. I believe the code you posted is incorrect, it should be:

model = rhino3dm.File3dm.Read(path)

you are missing the “rhino3dm”

Sorry but my code is correct.

I am importing rhino3dm using:

from rhino3dm import *

so that every method is in the main-context.

In your test you are importing rhino3dm using:

import rhino3dm

so you need to use the “rhino3dm” before the methods

Also would python say if there is any error and would not print the model.ArchiveVersion

Are you able to reproduce this error on your side or do you need some more informations?

Ah, right! I hadn’t noticed how you were importing. I cannot reproduce this unfortunately.