I am trying to retrieve the outside diameter of a piece of MEP Fabrication Pipe. It seems that the traditionally Dynamo methods which I normally use such as “Element.GetParameterValueByName” is not able to retrieve the desired information for me. I have even tried to search for built in parameters with no successes. I fear to obtain this information is going to require some Python. Unfortunately, I am not that strong with Python. I would be grateful to anyone whom can provide any assistance in helping develop a solution that will allow me to get the outside diameter of the fabrication pipe.
Can you screenshot the rest of the parameters under Element.Parameters? Maybe even the builtin ones as well?
(Sorry looking at a fab pipe right now but not sure if it has the same parameters as yours.
If it has a parameter name “Outside Diameter” than you should always be able to read it, it only becomes an issue if you want to write to a read-only.
You could always get the difference between the “Top” and “Bottom” of the fab pipe to get the outer diameter?
Thank you for the reply @nathaniel.g.macdonal. I have verified that there are no parameters called “Outside Diameter”, or anything similar. Unfortunately, there are just too many built in parameters to take a screen shot of. I tried to take the delta from the Top and Bottom parameters, but this method fails when working with sloped pipe.
Use a Parameter.Name node, a String.FromArray node and a Clipboard.SendTo node (clockwork package) and post the results.
Where there is a will…
Also, this may be due to a type parameter vs instance parameter issue as the fabrication element has a family type meaning that parameter may be controlled by the type.
or use the Watch+ node from the spings package
an option to calculate the outside diameter would be
- get the Pipe and use Element.Geometry
- create a boundingbox around it
- get the min- and max points of the boundingbox
- calculate the diameter from there
this works on horizontal and vertical pipes, not on slanted ones
I appreciate the replies. @jacob.small your are right where there is a will there is a way. See below for the full parameter list. I even obtained all of the built in parameter names that are relevant to fabrication parts. Some of them looked promising such as “Material Thickness”, which is returning the wrong value, and “Secondary Main Diameter”, which returns no value. See image. With my limited Python Knowledge and reverse engineering some existing nodes, I attempted to try and develop something that would retrieve the required information. It seems that I was partly successful in my attempts. My Python code at least returned something for “Material Thickness” as where the “Element.GetParameterValueByNameTypeOrInstance” did not return anything. Again See image. Also see Python Code I used below.
@Marcel_Rijsmus your method of getting the bounding box max and min points is similar to @nathaniel.g.macdonal 's method of using the delta from “Top” and “Bottom” parameters. The solution would work for flat and vertical pipe. I Unfortunately really need a solution that would work on sloped pipe as well.
I am giving this a valiant effort and would appreciate any additional support anyone could offer. I know the solution is out there. I just need help finding it.
Double Wall Material Abbreviation
Fabrication Service Name
Product Size Description
Spot Bottom Elevation with Insulation
Top Elevation with Insulation
Insulation Specification Abbreviation
Spot Bottom Elevation
Fabrication Service Abbreviation
Bottom Elevation with Insulation
Part Material Thickness
Family and Type
Product Finish Description
Part Sheet Metal Area
Spot Top Elevation
Spot Top Elevation with Insulation
Insulation Specification Abbreviation
Product Material Description
Double Wall Material Abbreviation
Product Specification Description
Product Long Description
Product Short Description
Double Wall Material Area
Main Primary Diameter
Pipe Invert Elevation
Built In Parameter List:
FABRICATION_INSULATION_MATERIAL_FINISH = Insulation Material
FABRICATION_FITTING_DESCRIPTION = Fabrication Fitting Description
FABRICATION_DOUBLEWALL_MATERIAL_ABBREVIATION = Double Wall Material Abbreviation
FABRICATION_MATERIAL_ABBREVIATION = Material Abbreviation
FABRICATION_INSULATION_SPECIFICATION_ABBREVIATION = Insulation Specification Abbreviation
FABRICATION_INSULATION_ABBREVIATION = Insulation Abbreviation
FABRICATION_SPECIFICATION_ABBREVIATION = Specification Abbreviation
FABRICATION_PIPE_INVERT_ELEVATION = Pipe Invert Elevation
FABRICATION_BOTTOM_ELEVATION_INCLUDE_INSULATION_OF_PART = Bottom Elevation with Insulation
FABRICATION_BOTTOM_ELEVATION_OF_PART = Bottom Elevation
FABRICATION_TOP_ELEVATION_INCLUDE_INSULATION_OF_PART = Top Elevation with Insulation
FABRICATION_TOP_ELEVATION_OF_PART = Top Elevation
FABRICATION_CENTERLINE_ELEVATION_OF_PART = Centerline Elevation
FABRICATION_SPOT_BOTTOM_ELEVATION_INCLUDE_INSULATION_OF_PART = Spot Bottom Elevation with Insulation
FABRICATION_SPOT_BOTTOM_ELEVATION_OF_PART = Spot Bottom Elevation
FABRICATION_SPOT_TOP_ELEVATION_INCLUDE_INSULATION_OF_PART = Spot Top Elevation with Insulation
FABRICATION_SPOT_TOP_ELEVATION_OF_PART = Spot Top Elevation
FABRICATION_PART_DOUBLEWALL_MATERIAL_AREA = Double Wall Material Area
FABRICATION_SET_UP_DOWN_TAG = FOT/FOB/SU/SD/=
FABRICATION_PART_SHEETMETAL_AREA = Part Sheet Metal Area
FABRICATION_SERVICE_ABBREVIATION = Fabrication Service Abbreviation
FABRICATION_PART_MATERIAL_THICKNESS = Part Material Thickness
FABRICATION_PART_NOTES = Fabrication Notes
FABRICATION_PART_LINING_AREA = Lining Area
FABRICATION_PART_ITEM_NUMBER = Item Number
FABRICATION_PART_INSULATION_AREA = Insulation Area
FABRICATION_SERVICE_NAME = Fabrication Service Name
FABRICATION_PART_DOUBLEWALL_MATERIAL_THICKNESS = Double Wall Material Thickness
FABRICATION_PART_DOUBLEWALL_MATERIAL = Double Wall Material
FABRICATION_PART_CUT_TYPE = Cut Type
FABRICATION_PART_BOUGHT_OUT = Bought Out
FABRICATION_PART_ALIAS = Alias
FABRICATION_ROUTING_SOLUTIONS_UI_PARAM = x of XX
FABRICATION_PRODUCT_CODE = Product Code
FABRICATION_PART_TAKEOFF_DIALOG_PARAM = More Parameters
FABRICATION_PART_DEPTH_OUT_OPTION = Main Secondary Depth Option
FABRICATION_PART_WIDTH_OUT_OPTION = Main Secondary Width Option
FABRICATION_PART_DIAMETER_OUT_OPTION = Main Secondary Diameter Option
FABRICATION_PART_DIAMETER_IN_OPTION = Main Primary Diameter Option
FABRICATION_PART_DEPTH_IN_OPTION = Main Primary Depth Option
FABRICATION_PART_WIDTH_IN_OPTION = Main Primary Width Option
FABRICATION_PART_ANGLE_OPTION = Angle Option
FABRICATION_PART_LENGTH_OPTION = Length Option
FABRICATION_INSULATION_SPEC = Insulation Specification
FABRICATION_PART_LENGTH = Length
FABRICATION_PRODUCT_ENTRY = Product Entry
FABRICATION_PART_DEPTH_OUT = Main Secondary Depth
FABRICATION_PART_WIDTH_OUT = Main Secondary Width
FABRICATION_PART_DIAMETER_OUT = Main Secondary Diameter
FABRICATION_PART_DEPTH_IN = Main Primary Depth
FABRICATION_PART_WIDTH_IN = Main Primary Width
FABRICATION_END_OFFSET_PARAM = End Offset
FABRICATION_START_OFFSET_PARAM = Start Offset
FABRICATION_SLOPE_PARAM = Slope
FABRICATION_RELATIVE_FILENAME = Relative File Name
FABRICATION_VENDOR = Vendor
FABRICATION_BOTTOM_OF_PART = Bottom
FABRICATION_TOP_OF_PART = Top
FABRICATION_OFFSET_PARAM = Offset
FABRICATION_LEVEL_PARAM = Reference Level
FABRICATION_SPECIFICATION = Specification
FABRICATION_VENDOR_CODE = Vendor Code
FABRICATION_PART_WEIGHT = Weight
FABRICATION_PART_DIAMETER_IN = Main Primary Diameter
FABRICATION_PART_ANGLE = Angle
FABRICATION_PRODUCT_DATA_INSTALL_TYPE = Install Type
FABRICATION_PART_MATERIAL = Part Material
FABRICATION_PRODUCT_DATA_OEM = OEM
FABRICATION_PRODUCT_DATA_PRODUCT = Product Name
FABRICATION_PRODUCT_DATA_ITEM_DESCRIPTION = Product Short Description
FABRICATION_PRODUCT_DATA_SIZE_DESCRIPTION = Product Size Description
FABRICATION_PRODUCT_DATA_MATERIAL_DESCRIPTION = Product Material Description
FABRICATION_PRODUCT_DATA_SPECIFICATION = Product Specification Description
FABRICATION_PRODUCT_DATA_LONG_DESCRIPTION = Product Long Description
FABRICATION_PRODUCT_DATA_RANGE = Product Range
FABRICATION_PRODUCT_DATA_FINISH_DESCRIPTION = Product Finish Description
FABRICATION_SERVICE_PARAM = Fabrication Service
import clr clr.AddReference('RevitAPI') from Autodesk.Revit.DB import * import clr clr.AddReference("RevitAPI") import Autodesk from Autodesk.Revit.DB import FabricationPart clr.AddReference("RevitNodes") import Revit clr.ImportExtensions(Revit.Elements) Inpt = UnwrapElement(IN) Cnt = UnwrapElement(IN) ItmList = list() if Cnt > 1: for Item in Inpt: MT = Item.MaterialThickness ItmList.append(MT) else: MT = Inpt.MaterialThickness ItmList.append(MT) OUT = ItmList
Dis you try to get the element’s type to see what parameters are available there?
@jacob.small I did try to get the elements type parameters. I could not find anything of use. See image.
Can you post a stripped down rvt file with just a few of these parts?
@jacob.small here is a link to download a small Revit file with just a couple of pieces of generic Fab pipe.
It seems that a Fabrication Pipe is assembled as a Mesh geometry thus would have no Outside Diameter parameter. This can be calculated via an intersecting plane workflow though
Are you not able to utilize the properties of the element as seen in the Revit model? for example I inserted a Tube from the Natural Gas Services of the Metric Configuration v7.05 and got the following properties:
So I used the following Dynamo graph to get the outside diameter:
That is assuming that the Main Primary Diameter is the Inside Diameter, it is somewhat hard to verify as no wall thickness is shown in the section view, but I am assuming the numbers are to be taken over the mesh in the model.