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.
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.
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.
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?
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
to get an understanding of the basics.
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:
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?
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?
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.
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.
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.
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.
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?
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.
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
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.
The node titles are not visible. You need to be zoomed in when taking the screenshot.
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. We can’t really show you an example if you don’t show us what you currently have.
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
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
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.