Create parts Method

Hi I’m having trouble using the Create parts method from the Partutils class.

This is my dynamo script and my python script

image

When I try to do the transaction, gives me this error “expected ICollection [LinkElementID] got ElementID”

image
I know that are two different methods in create parts in the revit api.
image
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. :slight_smile:

See this thread:

Hope that helps.

1 Like

Yes, it is solved! :grinning::grinning: thank you

1 Like

Hi All,

There is a video showing how to make parts by using dynamo.

Dynamo - Create Parts

I hope it is helpful!

1 Like