Create and access instance axes without appending it to Font.instances

If I’m instantiating a GSInstance() object without appending it to Font.instances first, I can’t get access to its axes property, I get:

Traceback (most recent call last):
  File "<macro>", line 12, in <module>
  File "GlyphsApp/GlyphsApp/__init__.py", line 291, in __repr__
  File "GlyphsApp/GlyphsApp/__init__.py", line 1696, in __iter__
  File "GlyphsApp/GlyphsApp/__init__.py", line 1707, in __len__
AttributeError: 'NoneType' object has no attribute 'countOfAxes'

Other properties like name, or the old weightValue, widthValue or customValue are available. Am I doing something wrong here or is that intended behavior?

edit: I can’t get interpolatedFontProxy from that instance either, which is what I want to do in the end (get stuff from an instance). I know I could just append the instance do what I need to and delete it afterwards, but I have to do this?

There is a GSInstance.font property. So you should get away with myInstance.font=myFont or, if that doesn’t work, try myInstance.setFont_(myFont).

I didn’t had time to continue on this project right away, but this is working! Thanks Rainer :v: