Open tibicen opened 2 years ago
There are still many reported issues with overloading in the version of PythonNet Dynamo uses - you can try casting the types in the method call and see if that helps.
I think this example could also be used as a workaround if absolutely necessary using reflection: https://forum.dynamobim.com/t/new-feature-preview-python-3-support-issue-thread/51649/116
to cast the type try x.ChangeTypeId[ElementId](result.Id)
I have the same issue. e.ChangeTypeId(e.GetTypeId())
throws:
TypeError: No method matches given arguments for ChangeTypeId: (<class 'Autodesk.Revit.DB.FamilyInstance'>, <class 'Autodesk.Revit.DB.ElementId'>)
and e.ChangeTypeId[DB.ElementId](e.GetTypeId())
did not work:
TypeError: No match found for given type params
Dynamo Core 2.17.0.3472 Dynamo Revit 2.17.0.7404 Revit 2024 Windows 10
Dynamo version
Dynamo Core 2.13.1.3887 Dynamo Revit 2.13.1.3891 Cpython
Revit version
2023
Operating system
Windows 10
What did you do?
I've changed
Python Script
node from Ipython to Cpython. The node would change viewport type. When using Cpython it failed onChangeTypeId(result.Id)
.What did you expect to see?
That ChangeTypeId would pass the ElementId object as in
viewport.ChangeTypeId(element_id)
Revit API -ChangeTypeId .What did you see instead?
The node prompt an error:
Below is minimal code puted in the node for recreation of error:
I've found an info on github repository about similar problem solved in Dynamo 2.8, and it is possible I'm doing something wrong. But for me I've double checked al the types of the objects.