architecture-building-systems / revitpythonshell

An IronPython scripting environment for Autodesk Revit and Vasari
MIT License
494 stars 113 forks source link

Revit Crashes on setattr() of a Property #47

Closed gtalarico closed 7 years ago

gtalarico commented 7 years ago

I have been able to reproduce this consistently. I figured it out while trying to set the Pinned property, but seems to happend when setting any property. Assume wall is an instance of Wall Class, and that all code below is running within a proper transaction context

>>> wall.Pinned
False
>>> wall.Pinned = True
wall.Pinned
>>> True

>>> getattr(wall, 'Pinned')
True
>>> setattr(wall, 'Pinned', False)
Revit Crashes, everytime.

This might be an IronPython <> Revit API, any ideas if there is a fix or perhaps another way to set a property dynamically?

gtalarico commented 7 years ago

Actually, I was able to set the attribute in this way... I think the problem might be somewhere. Closing it for now.

gtalarico commented 7 years ago

Yep, definitely not RPS. It was a recursion error in one of my classes caused by setattr Note to self: when Revit Crashes with no errors it's usually an infinite recursion loop!