# Color the objects depending on a certain conditon

**URL:** <https://forum.dynamobim.com/t/color-the-objects-depending-on-a-certain-conditon/80376>\
**Category:** Uncategorized\
**Created:** [August 26, 2022, 8:51am UTC](https://forum.dynamobim.com/t/color-the-objects-depending-on-a-certain-conditon/80376 "2022-08-26T08:51:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![h0905M4232](https://avatars.discourse-cdn.com/v4/letter/h/2acd7d/32.png) [@h0905M4232](https://forum.dynamobim.com/u/h0905M4232)\
**Post date:** [August 26, 2022, 8:51am UTC](https://forum.dynamobim.com/t/color-the-objects-depending-on-a-certain-conditon/80376/1 "2022-08-26T08:51:06Z")

</div>

I want to make a program to inspect if the objects are sited in the certain condition. I have made a program file attatched in this chat, so if there is any solution let me share your ideas.

The distance between the end of the two successive cylinders should be in the range from 5.0m to 10.0m. Somehow, a part of the cylinders is colored. I want the objects to be colored by the condition. 

[question.dyn](https://forum.dynamobim.com/uploads/short-url/54j5Eo98PibJUmhE46WfBi2NAIW.dyn) (219.4 KB)

 ![question](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/7/a732f18495243a8c9f254454882cf0bf9b2f425a.jpeg)

---

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [August 26, 2022, 8:57am UTC](https://forum.dynamobim.com/t/color-the-objects-depending-on-a-certain-conditon/80376/2 "2022-08-26T08:57:18Z")

</div>

Are they dynamo objects or other objects?

If they’re Dynamo objects just use GeometryColor.ByGeometryColor node.

If they’re objects outside Dynamo there are different nodes.

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [August 27, 2022, 9:25am UTC](https://forum.dynamobim.com/t/color-the-objects-depending-on-a-certain-conditon/80376/3 "2022-08-27T09:25:19Z")

</div>

Hello, here is an approach for a single point of a near cylinder

 ![Capture d’écran 2022-08-27 111911](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/7/f7b207a31b239762bc30e52baa446574ef8710a7.jpeg)

Otherwise, you have an infinite number of solutions.

Cordially  
christian.stan
