Missing as_file arg in Revit Worker

Hello!

It seems the Revit worker https://docs.viktor.ai/sdk/api/external/revit/ is just a wrapper around a PythonAnalysis (Python worker). Therefore,

output_file = analysis.get_output_file("...", as_file=True)

will not work as shown in the docs, because the PythonAnalysis https://docs.viktor.ai/sdk/api/external/python/#_PythonAnalysis does not have it. This leads to:

Could not retrieve updated model: get_output_file() got an unexpected keyword argument 'as_file'

Hi Alejandro,

Thanks for raising this!

Yesterday I noticed the same thing for the EtabsAnalysis / SAPAnalysis. In these cases the as_file is also in our tutorials.

I’ll raise an issue to get it fixed!

Rick

1 Like

Thank you for highlighting the mistake in the tutorials.

Maybe good to note. For the original GenericAnalysis, when we added we the as_file option we left the default as False (to support backwards compatibility), even though as_file=True is the preferred way to use it.

When we newly introduced the PythonAnalysis and the other analyses, we didn’t have to worry about backwards compatibility. Therefore, for these classes it is always set to True, so it always returns the output as a vkt.File object.

1 Like