Create a family with parametric parameter

Hello RIR team,

Would it be possible to created a parametric family with RIR, where the family will be basically be a cube, with some fixed width1, width2 (these are the lengths of the cube’s bottom face edges). While the height of the cube will be a family parameter, which could then be controlled with the use of RIR.
Essentially I would like to created such family with RIR:

I understand that it is quite easy to make this by hand with Revit UI in Family Editor.
But this is just a simple concept of what I am trying to achieve. Essentially instead of having a rectangular cross-section, I would like to have an actual aluminium extrusion cross-section, while the height of such extrusion would be parametric.

Can this be achieved at the moment with RIR components? And if not, can it be achieved with Revit API at all?

1 Like

That would require getting the Reference in the family and creating the dimension label , associating the parameter/shared, create formulas, etc.

None of which is available in RiR, as far as i’m aware dynamo doesn’t offer this either; and like you said, its easy with a few clicks in the Revit UI to get these associations hooked up.

1 Like

Thank you @Japhy
It is quite easy to do this for a rectangle, but in reality, I would have a more complex cross-section - then I thinkg it would be much easier to do it with RIR instead.

So in your opinion, there is nothing to achieve this - even in Revit API?

Totally possible, but you don’t see much about it due to the multitude of particulars that have to be dealt with each variation.

What problem/workflow are you trying to solve exactly?

1 Like

Hi @Japhy ,
Thank you very much for the link.
I see that Jeremy in that article, under the section “1. Creating an Extrusion for a Profile”, defines a fixed height of the cube to be 20 feet.

_thicknessMm = 20.0; 

What I would like to do is to use RIR components or RIR Revit Python component to created a ‘profile-like’ family, where length of that profile will me parametric. Example of such family:

The issue here is that if the profile extrusion changes face counts you’ll lose the driving Parameter. Which is the same if you did it via API, you need a particular reference(revit face) to set the label parameter. Creating a few extrusion types and using visibility parameters would work better.

profilebased
re_profiles.rvt (1.7 MB)

re_profiles.3dm (37.9 KB)
RE_Profiles.gh (14.3 KB)
edit: removed the human item selector component, only Elefront is req’d

1 Like

Thank you very much @Japhy !
My issue is that we have Revit 2019, and 2022 in the office, and I can’t open the Revit 2023 version.
But I see the principle from your screenshot.
Does the .rvt file you attached contain some geometry?

Apologies, that’s a bad habit, more often than not most firms are on the version before the latest.

Re_profilesRevit2019.rvt (1.4 MB)

1 Like

Here’s a more advanced version that requires a little more setup but handles the changes in profile face counts.

profilebased2

RE_Profiles2.gh (12.3 KB)
Re-FamilyType-Parameter.rvt (1.7 MB)

1 Like

Thank you very much for all your help @Japhy ,

So in the first rvt file you created the “ProfileBased” family in Revit with the use of Revit UI, and assigned parametric parameter “ProfileExtrusionHeight” to it. After that, this “ProfileExtrusionHeight” parameter can be controlled from RIR. Is this correct?

I couldn’t figure out what happend in the second (the latest Re-FamilyType-Parameter.rvt (1.7 MB)) rvt file.
How does Family 6.rfa changes its cross-sections?

These were created via RiR, the Parameter Label was added manually. In the second example we took it a step further to ensure we could maintain the extrusion reference.

The issue is the same if we dimensioned a face to face and then changed the Element, you’re going to break the reference. Instead of the dimension breaking you’re breaking the Height parameter. This is where doing this programmatically would be very particular for each extrusion.

invalidRef

1 Like

The second version uses a Revit Family Type Parameter (not to be confused with Family Type Parameters…)

All 4 Profiles are their own family, with the extrusion being locked to the reference plane, then all loaded into a new family with the aforementioned Family type parameter. The Reference planes of each family can then be associated with a Height parameter, this eliminates the Face references from changing.

This is fairly straight forward in the UI, it can be done in the API but would take a lot of configuring.

1 Like

To maintain stable dimensions you’ll want to go to the Reference Planes vs Faces (UI or API)

This is where you will want to control the priority of the references (strong or weak)

Define Priorities for Reference Planes | Revit 2018 | Autodesk Knowledge Network.

stable ref

1 Like

Thank you again for all the effort @Japhy ,
So to recapitualte (to see if I understood both solutions correctly): I should create the Familties with RIR, then in Revit UI manually assign the parametric family parameter (the height/length of the extrusion), and the control the value of this parameter with the use of RIR?

Yes!!

1 Like

hi. what it RIR ? it look likes on Dynamo. and .gh extention ?

Its a free grasshopper plugin developed by McNeel with the primary purpose of getting geometry and data back and forth. It works by running inside revit’s memory space and accessing its api.

Here is our guide:

3dm file with what we can open ?

Not sure what you are asking, there is an option to insert a 3dm into Revit, but we recommend using the grasshopper interface to control you categories etc.

1 Like