Dynamo for Bottom of Conduit Tagging
So I had a client ask about tagging for bottom of conduit. Here is a brief look at the process I followed for doing this in Dynamo. We can assume using conduit families that you will get different behaviors. Our catalog is in the Conduit Fittings realm, so this will be geared at using those. You can modify this if using system families. There is an Offset value that we will be tapping into as well as a Shared parameter we will call BOC. In addition we need the “Fitting Outside Diameter”. We are using the full diameter because we can take and modify this same code later and repurpose for Top of Conduit tagging as well. The Objective of this is to tag in Plan view all the conduits by Bottom of the conduit.
In our Library of conduit parts we have a parameter already named Fitting Outside Diameter. Any components added in a project will also utilize the Revit offset value as well. The only thing needed is to add BOC shared parameter. You can add it individually to your parts or add it at the project level to your family grouping. This is a length parameter by the way.
Now let’s begin walking through the Dynamo Nodes. First you need to capture the category of the family. Use the Categories node and select Conduit fittings. It will then tie into the All Elements of Category node.
Next we set up the Fitting Outside Diameter. Use Element.GetParameterValueByName
We will need a string for the parameter name we are searching for in the family. Like I said above we already have the Fitting Outside Diameter so we will be using this. If you have something already that represents this. Use what you have.
Follow a similar process for the Offset value. The string is set to Offset.
So far it should look like this below. Match the inputs.
Next you need a Code Block. Use a formula first and then insert the inputs where they go. You are creating the naming of the inputs at this time. I used PipeOffset-FOD/2; . By doing this we now have 2 inputs in the code block.
Add the outputs from the Fitting Outside Diameter and Offset Nodes(Element.GetParameterValueByName) from above. See picture below
Next add a Springs.NullSetParameter node. The string for the parameter is your shared parameter BOC.
When all is done follow the image below and double check your inputs. I test in manual Mode as well.
Now in the project we have some segments placed at different heights. We have also created a tag using the shared parameter and the size parameter. Next we tagged the conduits. It looks like this.
Notice there is no value on the BOC. Next run the Dynamo script we just made. It should look like this now.
So for workflow you select the conduits in a view and tag them. You would then run the Dynamo and update the tag. If a conduit is relocated or moved to another height. Just run the script again. To make a version of this for TopOfConduit, copy the dyn file and modify the code block to PipeOffset+FOD. Hope this gives you some ideas on other things you can autofill in your parameters.