PDA

View Full Version : 2014 Apply Diameter Parameter to Beam Family



sam.zielke437771
2014-01-13, 10:01 PM
Hello

I am a computer programmer attempting to apply a parameter to a relatively simple family so please forgive me for any ignorance :P Can you give me some advice on how I can apply a diameter parameter to my Pipe Family (the Family inherits from a Metric Structural Framing - Beams and Braces).

Below are images of my Family in its current state:
94618

94619

As you can see above I would like to apply a parameter called 'Pipe Diameter' that will set the diameter of the pipe. Can anyone provide advice on what steps I can take to achieve this?

Notes:
- Yes I am aware Revit has standard pipe families BUT I am writting an addin. And addins can only create pipes IF the user is in a MEP Project (in Revit 2013 this is solved in Revit 2014). So using standard pipes is not a solution to my question.
- The family was created by producing a Circular Extrusion in the Left view/elevation and then a Circular Void Extrusion. So maybe I can apply a reference line to the void extrusion then click that line and apply a parameter to it? Although I've tried this and it doesn't work but maybe I did it wrong?

dmahan
2014-01-14, 02:06 PM
See attached family file for simple generic model example, showing how to work with pipe diameter. Revit extrusions use radius to define the shape so you will need to use formula to convert to diameter. MEP pipes are system families do not think structural pipe will be much use for piping. Good Luck

Craig_L
2014-01-20, 12:59 PM
If the sizes are standardised (ie you don't people to be able to put a random pipe size in) you're better off using catlogue files.
These can then be altered (with code) to have other elements attached at the end.
A good example is a CHS (circular hollow section - cold formed steel member) looking like the one you have there, or having this (see image) on the ends which will change size with the size of your pipes.

94669
94670

For each different size the catologue file has a line looking like this
"273x10 CHS,.636451585,8260,273,10,CHS Fin Plate - Type 1 : 273 CHS,CHS Fin Plate - Type 1 : 273 CHS,CHS Capping Plate : 273 CHS,CHS Capping Plate : 273 CHS"

94671
94672

The fin plate is nested into the CHS family, and then added in using the catalogue file.

Note that its not necessary to nest in other pieces but its very handy for standard items which never change and means people can't get them wrong when you set them for them, also speeds up drafting and modelling time dramatically.
the standard catalogue file looks a bit like this, its a txt file that will be named the same as your 3d object
in this case my .rfa file is "Circular Hollow Sections.rfa"
and the .txt file stored in the same folder "circular hollow sections.txt"

,W##other##,A##area##millimeters,OD##length##millimeters,t##length##millimeters
21.3x3.2 CHS,.0140235095,182,21.3,3.2
26.9x3.2 CHS,.0183384355,238,26.9,3.2
33.7x2.6 CHS,.0195152335,254,33.7,2.6
33.7x3.2 CHS,.0236340265,307,33.7,3.2
33.7x4 CHS,.0287334845,373,33.7,4
42.4x2.6 CHS,.0250069575,325,42.4,2.6
42.4x3.2 CHS,.0303025485,394,42.4,3.2

etc etc