# Code Block for ImageTypes

**URL:** <https://forum.dynamobim.com/t/code-block-for-imagetypes/92716>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [August 9, 2023, 2:01am UTC](https://forum.dynamobim.com/t/code-block-for-imagetypes/92716 "2023-08-09T02:01:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jordanq](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@Jordanq](https://forum.dynamobim.com/u/Jordanq)\
**Post date:** [August 9, 2023, 2:01am UTC](https://forum.dynamobim.com/t/code-block-for-imagetypes/92716/1 "2023-08-09T02:01:42Z")

</div>

Hello can you help me please to solve a CodeBlock, for getting an ImageTypes by its name. I need to be assigned to a parameter value. I have this image as an example of what i want.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/7/171d79bf37e83edfbd486be3b8f24e82242d6421.png)

Thanks.

---

<div class="post-metadata">

**Author:** ![Jordanq](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@Jordanq](https://forum.dynamobim.com/u/Jordanq)\
**Post date:** [August 9, 2023, 2:26am UTC](https://forum.dynamobim.com/t/code-block-for-imagetypes/92716/2 "2023-08-09T02:26:01Z")

</div>

I already solved it with elementtype.byname node. But if you can explain me how it can be solved with a codeblock i would appreciate it. Thanks

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/0/50dcd4408b4ebefbaa33879cad5b7a404147ba07.png)

---

<div class="post-metadata">

**Author:** ![pyXam](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/pyxam/32/163009_2.png) [@pyXam](https://forum.dynamobim.com/u/pyXam)\
**Post date:** [August 9, 2023, 2:43am UTC](https://forum.dynamobim.com/t/code-block-for-imagetypes/92716/3 "2023-08-09T02:43:34Z")

</div>

You can sometimes use the “Node to Code Feature” of revit to help you in these senarios.

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/d/cd1a7ba43483f477e3e27c6f2e8ab52f28e24c3d.png)
