andydandy74 / ClockworkForDynamo

A collection of 450+ custom nodes for the Dynamo visual programming environment
MIT License
221 stars 96 forks source link

Document.ProjectParameters node has no results (error with units) #332

Closed Julie-Kidder closed 3 years ago

Julie-Kidder commented 3 years ago

Describe the bug When using clockwork with Revit 2022 (Dynamo 2.10 and 2.12) the Document.ProjectParameters node returns only nulls.
Null Return When I open the node, extract the python code and run directly I get the error:

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed. Traceback (most recent call last): File "", line 41, in AttributeError: 'InternalDefinition' object has no attribute 'UnitType'

Editing the python script to remove all references to the unit type resolves and returns the expected outputs. Ziped file attached showing null output and script with the clockwork node, original node python code, and edited code removing the units (workaround to resolve the error enough get what I needed for a script))

Steps to Reproduce Try to use the Document.ProjectParameters node to get project parameter information

Expected behavior Returning all the outputs of the node (or at least the ones that don't have an error)

My setup

Housekeeping Please make sure these boxes are checked before submitting your issue:

andydandy74 commented 3 years ago

Same issue as #331 ?

Julie-Kidder commented 3 years ago

Yes, it seems to be - I must have missed it when looking through the issues to see if it was already logged.

andydandy74 commented 3 years ago

This is caused by API changes in Revit 2022 around units (see https://archi-lab.net/handling-the-revit-2022-unit-changes/). Will be fixed as part of issue #333

andydandy74 commented 2 years ago

@Julie-Kidder This is fixed for Revit 2022 with the latest commit. It will be in the next Clockwork update which (at the snail speed I'm going) might still be a while. Probably best if you download the changed nodes and replace them in your package directory.