# Set parameter of image type

**URL:** <https://forum.dynamobim.com/t/set-parameter-of-image-type/9044>\
**Category:** Revit\
**Created:** [January 22, 2017, 12:53pm UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044 "2017-01-22T12:53:56Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Klempau](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/robert_klempau/32/19110_2.png) [@Robert\_Klempau](https://forum.dynamobim.com/u/Robert_Klempau)\
**Post date:** [January 22, 2017, 12:53pm UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044/1 "2017-01-22T12:53:57Z")

</div>

Hello,

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.  
 ![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/8/2/823e11e3921399ec1e5b211bc12639e2583edf75.png)

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [January 22, 2017, 2:10pm UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044/2 "2017-01-22T14:10:47Z")

</div>

Here is how to set the _Image_ parameter of an element:  
[http://dynamobim.org/forums/topic/populate-image-parameter-for-list-of-elements/](http://dynamobim.org/forums/topic/populate-image-parameter-for-list-of-elements/)  
Now, how to choose this image relative to different parameters would probably require some kind of database / Excel sheet / Dictionary…

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [January 22, 2017, 2:43pm UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044/3 "2017-01-22T14:43:39Z")

</div>

Hi @Robert_Klempau

> [@Robert\_Klempau](#):
>
> Image Type parameters are Type related and I need an instance related image parameter.

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

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/0/40874455efa442c229b9744dd9d822650a8cf6df.jpg)

---

<div class="post-metadata">

**Author:** ![Robert\_Klempau](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/robert_klempau/32/19110_2.png) [@Robert\_Klempau](https://forum.dynamobim.com/u/Robert_Klempau)\
**Post date:** [January 22, 2017, 4:48pm UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044/4 "2017-01-22T16:48:31Z")

</div>

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.

![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/8/287a026f4efb5b00897adaf0377e1bc97a89b2c1.png)

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

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [January 22, 2017, 5:10pm UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044/5 "2017-01-22T17:10:59Z")

</div>

@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.  
[/quote]

Definitely I will.

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [January 22, 2017, 5:18pm UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044/6 "2017-01-22T17:18:34Z")

</div>

As a last contribution to this thread, I can see “Image” as an instance parameter of this duct fitting:  
 ![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/4/d/4de00d3e5174c68d3d57d3dcaa4403844028e608.JPG)

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [January 22, 2017, 5:20pm UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044/7 "2017-01-22T17:20:29Z")

</div>

@Yna_Db So do i 🙂. 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 😉

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [January 22, 2017, 5:22pm UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044/8 "2017-01-22T17:22:56Z")

</div>

@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 😌

---

<div class="post-metadata">

**Author:** ![Robert\_Klempau](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/robert_klempau/32/19110_2.png) [@Robert\_Klempau](https://forum.dynamobim.com/u/Robert_Klempau)\
**Post date:** [January 22, 2017, 7:48pm UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044/9 "2017-01-22T19:48:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Robert\_Klempau](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/robert_klempau/32/19110_2.png) [@Robert\_Klempau](https://forum.dynamobim.com/u/Robert_Klempau)\
**Post date:** [January 22, 2017, 8:39pm UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044/10 "2017-01-22T20:39:35Z")

</div>

@Kulkul,

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.

> **[WeTransfer](https://cadacgroup.wetransfer.com/downloads/c2aec645d883e96a16f1638f2df4e72420170122203846/6579fb)**
>
> WeTransfer is the simplest way to send your files around the world

---

<div class="post-metadata">

**Author:** ![Mohammad\_Nawar](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mohammad_nawar/32/45287_2.png) [@Mohammad\_Nawar](https://forum.dynamobim.com/u/Mohammad_Nawar)\
**Post date:** [January 23, 2017, 1:18pm UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044/11 "2017-01-23T13:18:51Z")

</div>

@Robert_Klempau

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.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/9/397134bd70b3c993bc407310bd75b99e7ef8e2ac.JPG)

---

<div class="post-metadata">

**Author:** ![Robert\_Klempau](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/robert_klempau/32/19110_2.png) [@Robert\_Klempau](https://forum.dynamobim.com/u/Robert_Klempau)\
**Post date:** [January 25, 2017, 6:04pm UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044/12 "2017-01-25T18:04:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mohammad\_Nawar](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mohammad_nawar/32/45287_2.png) [@Mohammad\_Nawar](https://forum.dynamobim.com/u/Mohammad_Nawar)\
**Post date:** [January 26, 2017, 6:13am UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044/13 "2017-01-26T06:13:23Z")

</div>

Hi @Robert_Klempau

Try this code I made it work based on your excel and Revit model.  
[Image.dyn](https://forum.dynamobim.com/uploads/short-url/z8OUCJXKIsaDHxwDhU44LfmB22c.dyn) (30.1 KB)

![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/f/f/ff8bdcc2221f6f3901b03eddbdcb666751d72d46.JPG)  
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.

Regards

---

<div class="post-metadata">

**Author:** ![Robert\_Klempau](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/robert_klempau/32/19110_2.png) [@Robert\_Klempau](https://forum.dynamobim.com/u/Robert_Klempau)\
**Post date:** [January 26, 2017, 6:26am UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044/14 "2017-01-26T06:26:10Z")

</div>

Thanks @Mohammad_Nawar,

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

---

<div class="post-metadata">

**Author:** ![Robert\_Klempau](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/robert_klempau/32/19110_2.png) [@Robert\_Klempau](https://forum.dynamobim.com/u/Robert_Klempau)\
**Post date:** [January 26, 2017, 6:38am UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044/15 "2017-01-26T06:38:31Z")

</div>

Hello @Mohammad_Nawar,

you are good! 👍

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.

Regards,

Robert

---

<div class="post-metadata">

**Author:** ![Mohammad\_Nawar](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mohammad_nawar/32/45287_2.png) [@Mohammad\_Nawar](https://forum.dynamobim.com/u/Mohammad_Nawar)\
**Post date:** [January 26, 2017, 7:00am UTC](https://forum.dynamobim.com/t/set-parameter-of-image-type/9044/16 "2017-01-26T07:00:06Z")

</div>

Hi

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.

Regards
