Set parameter of image type


I was wondering if it is possible in Dynamo to set the project parameter of parameter Type Image.
The case I am working on is that I want to show the right image of al my duct fittings based on the parameter Duct fitting Type, Size and Angle.
in Revit OODB that is not possible because build in Image Type parameters are Type related and I need an instance related image parameter.

Is it passible with Dynamo to add images from a folder to your Revit project.

Here is how to set the Image parameter of an element:
Now, how to choose this image relative to different parameters would probably require some kind of database / Excel sheet / Dictionary…

Hi @Robert_Klempau

Did you try changing your parameter (Image) to Instance?

Hello @Kulkul,

I see in your image that you can set the image parameter to Instance.
But when I try this in a Duct fitting or a Pipe fitting, the moment I select the Image Type of Parameter the Instance and Type options get grayed out.
When I set the Instance option first and then try to set the Type op Parameter to Image the Image type is not in the parameter Type list.
As you can see below.

So I need to add a project parameter to the fittings in the project and update value with the right image.

hope you can help me with this case.

Thanks in advanced,


@Robert_Klempau Could you please drop here your dummy revit file with all your fitting families.[quote=“Robert_Klempau, post:4, topic:9044”]
hope you can help me with this case.

Definitely I will.

As a last contribution to this thread, I can see “Image” as an instance parameter of this duct fitting:

@Yna_Db So do i :slight_smile:. He is using different fittings a part from the standard. That is why i asked @Robert_Klempau to drop his revit file so that we can provide him possible solution :wink:

@Kulkul, I would certainly not doubt that you will solve this. I just had a look by curiosity because I am not very proficient yet with systems. I will follow your discussion with attention :relaxed:

@Kulkul, Yes I will drop my project here.
just preparing it.


In the attachment, you will find several files I am working on.
I struggle how to get the right image from the Excel file and set it to the right fitting.


If I understood you in a right way, you can after finish modeling to run dynamo code and each element will take the right image automatically. as you see in the picture below :), and just a note: you can add more rule for the angle to choose the right element.

Hello @Mohammad_Nawar,

Thanks for the update.
But it’s not clear for me how I find the right image in my Excel file where I define the right picture for the Duct fitting based on the family type, and angle.
from the family I get the family type and angle and from the Excel file a list of three columns with family type, angle and imagename.
how do I match the right picture to the right family type with a certain angle?

I want to create a script that adds the right picture in one time.

Hi @Robert_Klempau

Try this code I made it work based on your excel and Revit model.
Image.dyn (30.1 KB)

Notes: I removed one of the Tee from the excel because both of them will take the same picture, also there was no information for the transaction so after you read the dyn you can add more nodes for it.


Thanks @Mohammad_Nawar,

I will gif it a try and get back to you on this.

Hello @Mohammad_Nawar,

you are good! :+1:

It works fine.
This is what I was looking for and learn from it.

Do you know if it is possible with a Dynamo script to import all the images from a folder to the Revit project.
Or all the images that are listed in a certain Excel worksheet and are in a Windows folder to import in my project.
That would be great.
then I can run them after successively.




happy that it worked with you, about the folder and importing I am sure there is way but am not aware how to do it yet, create a new topic for this question. maybe you will find fast answer.