# Enable connection visibility when the conduit closest to it is identified

**URL:** <https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481>\
**Category:** Dynamo Player\
**Tags:** revit, dynamo\
**Created:** [May 30, 2024, 9:06pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481 "2024-05-30T21:06:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![fabrinersilva](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@fabrinersilva](https://forum.dynamobim.com/u/fabrinersilva)\
**Post date:** [May 30, 2024, 9:06pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/1 "2024-05-30T21:06:48Z")

</div>

I need to develop a routine that selects my entire project. I want the conduits to be adjusted so that the conduit connection sleeve is enabled if there is conduit connected to it, and disabled if there is none connected to it.

The idea is that designers don’t have to worry about enabling or disabling connections to make work more agile.

 ![ROUTINE](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/b/fb0361b1117e1379709eedfb58ada4bc4a3a2c03.png)

In the image below, you can see some points that I want to correct to make the modeling correct.

 ![ROUTINE - EX.](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/4/4437251235228ea859152e917780bbaafa64e7ce.png)

I have no idea how to start the routine in dynamo. Could someone help me?

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [May 30, 2024, 9:38pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/2 "2024-05-30T21:38:22Z")

</div>

Determine your two exact conditions and how they’re defined in _Revit_. Once you know the relationship in Revit and what those conditions look like, _then_ you can start to work on identifying those conditions through Dynamo. The Dynamo process will follow the same logic as Revit, so it’s best to start there.

---

<div class="post-metadata">

**Author:** ![fabrinersilva](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@fabrinersilva](https://forum.dynamobim.com/u/fabrinersilva)\
**Post date:** [June 3, 2024, 8:12pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/3 "2024-06-03T20:12:23Z")

</div>

Routine logic:

- Select all conduits  
-Identify the points where the conduits are connected (5 points as shown in the first image of this forum)  
-Enable the visibility of the conduit sleeves depending on the conduit connected to the respective point.  
-Disable the conduit sleeves if there is no conduit connected to the point.

 ![Imagem](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/f/4ff04ad4d548946cc4702a2bbdf8c753798c6743.png)

In this first test, I tried to identify a parameter created, TEST\_DYANMO, and change its value to YES. However, an error occurred. Can anyone help me with this error?

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [June 3, 2024, 8:37pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/4 "2024-06-03T20:37:35Z")

</div>

The box has five connectors (and five visibility parameters). You need to 1) identify _which_ connector (s) has a conduit connection and 2) map that to the respective parameter(s).

Your node has an error because you’re not providing the correct information. Your code blocks contain variables (which is why they both have inputs) and aren’t actually passing any values. The `parameterName` needs to be a string (`"TEST_DYNAMO"`) and the `value` needs to be a boolean (or binary value). With TEST\_DYNAMO being a type parameter, you also need to get it from the family type, not the instance. You can get the type with `Element.ElementType`.

It’s also highly recommended you work through the [Dynamo Primer](https://dynamoprimer.com)  
to get an understanding of the basics.

---

<div class="post-metadata">

**Author:** ![fabrinersilva](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@fabrinersilva](https://forum.dynamobim.com/u/fabrinersilva)\
**Post date:** [June 4, 2024, 6:21pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/5 "2024-06-04T18:21:54Z")

</div>

The first part of the code worked. However, to solve the connector issue I’m trying to take the following video as a starting point:

[![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/7/970513961c2a1994d3680bad835553796d666969.jpeg "Dynamo | Get Connector Point Location | Revit and Python") ](https://www.youtube.com/watch?v=ky1rbRvGQFA)

Searching on the subject I found a node “Get Connectors” from the package. This node is available in the “RevitNodes” package in Dynamo. But I couldn’t locate it. Do you have any idea of an existing package or any way of identifying these connectors?

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [June 4, 2024, 6:26pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/6 "2024-06-04T18:26:24Z")

</div>

That’s using the API in python.

The `MEPover` package has a few nodes for connectors.

---

<div class="post-metadata">

**Author:** ![fabrinersilva](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@fabrinersilva](https://forum.dynamobim.com/u/fabrinersilva)\
**Post date:** [June 4, 2024, 8:44pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/7 "2024-06-04T20:44:58Z")

</div>

I’ve already looked for similar nodes in the MEPover package, but I haven’t found anything that could help me. I downloaded the Clockwork package to access the nodes: FamilyType.AllElementsOfFamilyType and MEPConnector.ByMEPSystem in order to identify the family connectors, but I couldn’t find these nodes.

Could someone give me a different suggestion to solve this problem according to the line of reasoning?

Even using the API. I’m running out of ideas.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [June 4, 2024, 8:50pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/8 "2024-06-04T20:50:17Z")

</div>

> [@fabrinersilva](#):
>
> Even using the API. I’m running out of ideas.

What have you tried with the API? That’s probably the best way to go as you’ll need to get the connector description to know which connector goes with which visibility parameter.

EDIT: It looks like the MEPover nodes already include the description.

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

---

<div class="post-metadata">

**Author:** ![fabrinersilva](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@fabrinersilva](https://forum.dynamobim.com/u/fabrinersilva)\
**Post date:** [June 5, 2024, 1:04pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/9 "2024-06-05T13:04:43Z")

</div>

I’m trying to find a site that explains MEPOver node information so I can understand what data and in what format it needs to be in order to avoid node errors. I tried to develop the nodes as you showed and got errors. But I’m going to try to do something about it.

 ![Código1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/7/37eaa41afa08c2d2ff1806f8e330782945806d67.png)

To develop something with the API, I’m trying to identify the connector points that don’t appear in RevitLookup, but I haven’t managed to find them yet.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [June 5, 2024, 2:06pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/10 "2024-06-05T14:06:11Z")

</div>

You’ll probably have to open the custom node to see what specific issue it’s having. Do you have IronPython installed? I don’t know if MEPover has documentation anywhere, but most of the custom nodes are just out of the box content and python - all of which you can see for yourself within the node.

`Connectors` are under the `ConnectorManager`. The python video you linked earlier should explain how to get them.

---

<div class="post-metadata">

**Author:** ![fabrinersilva](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@fabrinersilva](https://forum.dynamobim.com/u/fabrinersilva)\
**Post date:** [June 5, 2024, 7:00pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/11 "2024-06-05T19:00:33Z")

</div>

The Revit version I’m working with is Revit 2024 and Dynamo v.2.17.0  
I had the same problem as on this forum:

> [@MEPover MEP Connector info not working in REVIT 2023](https://forum.dynamobim.com/t/mepover-mep-connector-info-not-working-in-revit-2023/78643):
>
> Hello everybody, my first post on this forums but have been tinkering with Dynamo now for a little bit. I have been using the MEPover addons now for a few years and it has been amazing but we have upgraded to REVIT 2023 and I’m finding the node ‘MEP connector info’ is no longer returning the Conduit fitting end point coordinates. Im not really skilled in Python, but any help to either get the node working or another way round would be greatly greatly appreciated as this node is used …

To solve it, besides correcting the code in line 107, I had to put the Python Engine Version in CPython 3.

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

Now I’m working on making a filter on the connectors it has identified, since it has identified 6 connectors (5 conduit and 1 electrical - within the family) I want to separate the conduit connectors.

I still don’t know how to associate the results of true or false with the visibility of the gloves, with some existing node. Any ideas?

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [June 5, 2024, 7:48pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/12 "2024-06-05T19:48:32Z")

</div>

You need to give the connectors a description within the family so that you can identify each unique connector. Then you can map the description with the visibility parameter.

---

<div class="post-metadata">

**Author:** ![fabrinersilva](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@fabrinersilva](https://forum.dynamobim.com/u/fabrinersilva)\
**Post date:** [June 6, 2024, 1:48pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/13 "2024-06-06T13:48:32Z")

</div>

I was able to name the connectors according to their position in relation to the visibility parameters of the gloves. So, if connector 1 is true, enable the visibility of connector 1’s glove.

Do you have any idea how I can make the node work more dynamically? Select all the conduits in the project, for example

 ![Luvas dos conduletes 1_2024-06-06_11-26-57](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/1/311a105fb58d9d92fcbce5950612fdaaedfd39c5.png)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [June 6, 2024, 2:37pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/14 "2024-06-06T14:37:44Z")

</div>

Can’t read the nodes in your screenshot, but the best option is probably to create a dictionary of connector descriptions and visibility parameters. (Unless they’re named the same, in which case you can just use the description as the parameter name directly.) Then you just need to filter the connections and then provide the parameter names to be set.

---

<div class="post-metadata">

**Author:** ![fabrinersilva](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@fabrinersilva](https://forum.dynamobim.com/u/fabrinersilva)\
**Post date:** [June 6, 2024, 4:23pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/15 "2024-06-06T16:23:16Z")

</div>

Click once on the image and it zooms in!  
Could you show me an example of how to do this? I couldn’t understand it.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [June 6, 2024, 5:00pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/16 "2024-06-06T17:00:50Z")

</div>

> [@fabrinersilva](#):
>
> Click once on the image and it zooms in!

The node titles are not visible. You need to be zoomed in when taking the screenshot.

> [@fabrinersilva](#):
>
> Could you show me an example of how to do this? I couldn’t understand it.

How to do what exactly? You need to show some attempt each step of the way. If you’re unfamiliar with something you can search the forum or the [Dynamo Primer](https://dynamoprimer.com). We can’t really show you an example if you don’t show us what you currently have.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [June 6, 2024, 5:05pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/17 "2024-06-06T17:05:31Z")

</div>

> [@fabrinersilva](#):
>
> Could you show me an example of how to do this? I couldn’t understand it.

Have a look at this post: [How to export a graph image [Correctly]](https://forum.dynamobim.com/t/how-to-export-a-graph-image-correctly/99364)

---

<div class="post-metadata">

**Author:** ![fabrinersilva](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@fabrinersilva](https://forum.dynamobim.com/u/fabrinersilva)\
**Post date:** [June 6, 2024, 5:40pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/18 "2024-06-06T17:40:25Z")

</div>

I managed to export the image correctly. I had to zoom in.

 ![Luvas dos conduletes 1_2024-06-06_02-28-15](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/f/ffc8f6e91084658792b2741b7d8f2a8b6772abd4.png)

I need a way to filter only the conduit connectors and remove the electrical connector to stop displaying the error message at the end of the routine.Both at the bottom and at the top of the code.

At the beginning of the routine I’m thinking of creating a sort of list with all the families selected and calling each one separately to call the code. But first I need to solve this electrical connector issue

I recorded a video using the routine in the link below  
[Dynamo](https://1drv.ms/f/s!AlBVbu3Xf7AsjNNu4MHGvHFwIj7DNQ?e=mNRZet)

---

<div class="post-metadata">

**Author:** ![fabrinersilva](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@fabrinersilva](https://forum.dynamobim.com/u/fabrinersilva)\
**Post date:** [June 6, 2024, 8:15pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/19 "2024-06-06T20:15:29Z")

</div>

I managed to adjust the electrical connector issue, but an error still occurs when the code is executed, but I couldn’t identify why.

 ![Luvas dos conduletes - ok_2024-06-06_05-01-14](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/b/9b05f94a59413f4996da1662f4908df7395709eb.png)

Somehow, when I select the object and run the code, it generates new settings and enables gloves that weren’t supposed to be enabled. I’m sending the family so that someone can help me.

In the video I show what happens. The video is in this folder.  
[Dynamo](https://1drv.ms/f/s!AlBVbu3Xf7AsjNNu4MHGvHFwIj7DNQ?e=mNRZet)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [June 6, 2024, 8:54pm UTC](https://forum.dynamobim.com/t/enable-connection-visibility-when-the-conduit-closest-to-it-is-identified/101481/20 "2024-06-06T20:54:04Z")

</div>

Try setting the parameters just once as a list, rather than pulling the list apart and running the same code multiple times.

Also, try closing and reopening the file between runs. You may just have some data that’s not updating or you may have some element binding stuck in the file now.
