Hi I’m having trouble using the Create parts method from the Partutils class.
This is my dynamo script and my python script
When I try to do the transaction, gives me this error “expected ICollection [LinkElementID] got ElementID”
I know that are two different methods in create parts in the revit api.
But, if I am in current document doing the transaction why is the method asking me for the LinkelementID?
Much appreciate if someone could help,
Regards
PS: I’m new so what is the best way to paste short videos of the screen record and to put the python scripts in the post?
Hi @joao.jorge ,
Take a look at the Revit Docs and the error, that the Dynamo node gives you.
In the Revit Docs you’ll see that the CreateParts expects a ICollection of ElementId, just as the error message from the Dynamo nodes tells you. You need to convert the ElementId to a IColletion of Id’s regarding there is only one Id.
See this thread:
Hello im having some problems when i’m using icollection to hide elements temporary in views.
[image]
it says to me :
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 49, in
File “”, line 44, in Fhide
TypeError: expected ICollection[ElementId], got ElementId
im trying to create an Ilist but it says that:
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
Fi…
Hope that helps.
1 Like
Yes, it is solved! thank you
1 Like
l8j9h
January 25, 2022, 3:18am
4
Hi All,
There is a video showing how to make parts by using dynamo.
Dynamo - Create Parts
I hope it is helpful!
1 Like