Using Dynamo for copying IFC parameter to Revit parameters

Hi everyone,
I’m trying to copy some IFC parameters to other parameters in the properties panel as the picture in below:


How can I copy NameOverride parameter to Mark parameter?

I’m using Revit 2018 and Dynamo 2.0. I made a script that works with different parameters but I can’t make it work for some parameters. I’m very new to Dynamo and I’m sure I’m missing something that I can’t make it work.
The picture of script is coming in next post.

Any recommendation is appreciated.

Image of the script :slight_smile:

Hi @NaSha,

As far i can see, you are trying to transfer instance parameters.
To do that you need to collect the wall instances (not the types).
See what happens when you connect “All Elements of Category” directly to “Element.GetParameterValueByName” and “Element.SetParameterValueByName” (skip Element.Name and WallType.ByName).

Kind regards,
Mark

Hi @MJB-online, Thanks a lot for you reply. I tried your solution and worked, but I still have problem with another Parameter that I created from Project Parameters in Revit. How can I copy one parameter to the ones that I created myself?

Are you trying to “set” a Type or Instance parameter ?

Type
I tried to connect all the elements to Set Parameters by Name, but it didn’t work.

I can’t see what the output list of the “WallType.ByName” looks like.
If it’s a nested list maybe you should use a “Flatten” node between the “WallType.ByName” and “Element.SetParameterbyName” node (or use levels on the last one).

Thanks again for your reply.
I tried to flatten as well but didn’t work either.
I noticed if I create a new project parameter in the revit file, I struggle to assign information to it through dynamo.


Do you have any recommendation how to fix this issue?

Hi @NaSha

What does the error says at Element.SetParameter node? And also could you show us image of Parameter
(Fagkode) properties.

Hi @Kulkul
This is the error: Warning: Element.SetParameterByName operation failed. The parameter’s storage type is not a string.

@NaSha error says it all. Check the parameter storage type. You should feed values according to storage type.

By storage type you mean that the parameters (Parent ID and Fagkode) should have matching type. for example they both have to be text or number. if that’s so, I have checked it and still it’s the same. I also had same problem in a different script.
I’m very new to Dynamo and I’m still learning of course.

No worries! Feel free to ask all your queries.

Could you show me screenshot of parameter (Fagkode) properties.

1 Like

Here are the screenshot from properties panel and parameters properties:


Storage type is number not a string. You where feeding string values. You can delete that parameter and create a new one with parameter type as “Text”. You will be good to go then.

3 Likes

Yes, that worked. awesome, thanks a lot :slight_smile:

You’re welcome!

1 Like