formula <family type> parameter

formula <family type> parameter

Anonymous
Not applicable
14,292 Views
11 Replies
Message 1 of 12

formula <family type> parameter

Anonymous
Not applicable

Hi all

 

i have this shared parameter (text) called shorttxt set in a door family and 2 nested handles families (knob.rfa and pullhandle.rfa) set to a <Family Type> parameter called handle_slection... Is there a way to set a formula for the shared parameter to read/display text such as 

 

"Knob" if the knob.rfa family is selected In the <Family Type> parameter

"pull handle" if the pullhandle.rfa is selected

 

i tried to use =if(handle_selection = "handletype: Knob", "knob", "pull handle") but I'm getting error for inconsistent units

 

any ideas if I can automate he shared txt parameter with a formula based on a <family type> parameter?

0 Likes
Accepted solutions (2)
14,293 Views
11 Replies
Replies (11)
Message 2 of 12

Alfredo_Medina
Mentor
Mentor

Why not simply make the Family Type parameter as a shared parameter, and use its value for schedules and tags?


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
Message 3 of 12

Anonymous
Not applicable

Because when scheduling the <Type Family> parameter gives a long name when others in the company require some sort of short hand symbol which is recognized by their software...example: when the <family type> Reads " Handletype: Knob20A " the other team extracting the info from our schedule into orca or arriba needs it to read KB2A

 

while one can do it manually going through the door schedule, having it automated using a formula or something to fill the text parameter as per selected handle type would be nice

0 Likes
Message 4 of 12

Alfredo_Medina
Mentor
Mentor

Are the choices for handle and other things changed by type or by instance? In other words, make these choices by selecting a difffernt type in the family, or by changing values in the instance properties of the family? If it is by type, you can simply put the abbreviated name as another parameter in the type. Please let me know.


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
0 Likes
Message 5 of 12

Anonymous
Not applicable

At the moment they are instance parameter.. The same door type different instances can receive various/different types of handles.

 

I'm not sure I got right what you meant ...if I set it by types then I need to duplicate and create several versions of the door each with different handle? If so I will end up with a long list of family types just because of handles because this type of door has two only but I have doors with 6 types of possible handles.

 

 

 

Shouldn't  a formula be able to fill in text param?

0 Likes
Message 6 of 12

Alfredo_Medina
Mentor
Mentor

If the change is by instance, it is complicated to achieve what you want. It requires several other parameters in the in the door family, and some long formulas.

 

If the changes were by type, yes, you need to create multiple types, having one unique type for each case, but you could enter the unique abbreviation code for each part, in shared text parameters.

 

As I said before, the simplest solution is to make the family type parameter as a shared parameter. If the information is going to be exported from the schedule, it is easier to assign the abbreviation for each type of knob, for example, in other applications such as databases or spreadsheets. In Revit, unfortunately, it is not possible to say if this text is "this", make this other parameter "that". The value of text cannot be the condition for the IF.


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
0 Likes
Message 7 of 12

RDAOU
Mentor
Mentor

@Anonymous

 

I might be able to help if some additional info is given 🙂 don't have access to REVIT over the weekend so I can only rely on your input and feedback if you don't mind that...and I don't believe you need any formula as long as the text abbreviation for each handle is constant (example: a knob X is always KBx and a handle Y is always H...ie. User schedule them as they come)

 

  1. Are the different handles modeled in one family (i.e.: one family with duplicate family types) and you are using yes/no visibility parameter to hide/show the related handle in each family type?
  2. OR are they modeled in separate families (i.e. Each handle is on a separate .rfa file and u r nesting 3 .rfa files into the door family?)
  3. did you check the "shared" property in the handle family?
  4. did you add the text shared parameter in the the Handle family(ies). That's where you need it the first place before nesting into the door and that's where u predefine its value and not in the door family

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


0 Likes
Message 8 of 12

Anonymous
Not applicable

The handles are in three .rfa files modeled using generic model and nested into the door. I have the shared checked yes and I put the shared parameter in all 3 families of the handles as well as the door just not sure how to relate them to each other 😕 guidance is highly appreciated

0 Likes
Message 9 of 12

RDAOU
Mentor
Mentor
Accepted solution

I see ... Now it is clearer to me what you are trying to do 🙂 at first I thought you are just scheduling the handles...If that was what you were trying to do, there should be no harm modeling them (handles) as generic models... In such case you need to add the text shared parameters in those generic models and check the "shared" option in the Family category and Properties...

 

Try the following...

  1. Model your handles in a Door family templates (all of them) and associate the visibility of the elements for each one handle to a yes/no parameter
  2. in the Family Types dialog create new type...1 type for each handle (ie 3 handles => 3 types, 4 handles => 4 types...etc)
  3. Then set the proper yes/no parameter to switch elements of the relevant handle visible in each family type
  4. No need to add shared parameter at this point
  5. Save it and load it into the door family

In the door family (after you load in the handle family) you will need

  • 3 TYPE  text parameters to define the abbreviations for each handle type,
  • 1  Instance Master<Family Type: Doors> parameter which will serve as a selector later in the project,
  • 3 Type <Family Type> parameters (not shared) also Doors Category. those will be the Agent for your formula which will rid you of the Inconsistent units error
  • 1 Instance Shared Text parameter, ...where you will set your formula and which you will schedule in the project... the formula is short and easy very similar to what you had in the original post...

Formula for your shared parameter in the door family would then be  of the form

    if(Master<Family Type:Doors> = Agent1<Knob>, TextParameter1, if(Master<Family Type:Doors> = Agent2<Handle>, TextParameter2, TextParameter3))

 

Result would be something as follows...if it gets confusing I will upload in a following reply a detailed method statement since I m documenting it anyways

111.png

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 10 of 12

RDAOU
Mentor
Mentor
Accepted solution

@Anonymous

 

Steps to create and schedule this are found on the following LINK https://knowledge.autodesk.com/community/article/24566

 

Door family is attached to the above article ...hope that helps

 

Cheers

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 11 of 12

Alfredo_Medina
Mentor
Mentor

Excellent explanation. That's what I meant in my post # 6 above, in the first sentence. New parameters (3 "children" family type parameters (one for each option) and 1 "parent" family type parameter to control those 3, one formula for the master, and one formula for the text, (if there are many types of nodes, this formula gets longer) and all this is just to pass the abbreviation or reference to the text parameter. If the user needs to control another object in the same door family, a new set of family type parameters and formulas is needed. 

 

That's what I said that I prefer to pass just the value of the existing family type parameter as a shared parameters, and let others find the equivalent abbreviations by other simpler methods.


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
0 Likes
Message 12 of 12

Anonymous
Not applicable

It is indeed an awesome explanation and it works perfectly well and does exactly what I had in mind 

0 Likes