Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Parameter Formula

5 ANTWORTEN 5
GELÖST
Antworten
Nachricht 1 von 6
Inerin
1609 Aufrufe, 5 Antworten

Parameter Formula

Hi I have some parameters within a door family which are yes/no parameters.

 

I want to schedule what parameters are ticked on, I have done this by creating a separate parameter with an if formula which works. BUT if several of the parameters are ticked i want then to come up with a comma between them. 

 

Example (same formula different parameters): 

(if(Oranges, "Orange Bananas", if(Red Peppers, "Red", if(Yellow Peppers, "Yellow", if(HNW_Door_PushPull, "Push Pull", "-")))))

 

The output I get if i select one is correct, but if i select two I want to get all the ticked elements with a comma in between; "Orange, Red, Yellow"

 

Any ideas how the formula would be to achieve this? 

 

 

 

5 ANTWORTEN 5
Nachricht 2 von 6
barthbradley
als Antwort auf: Inerin

if(and(Orange, Red, Yellow)...

 

The condition would be true if Orange, Red and Yellow are all checked. Is this what you are after? 

Nachricht 3 von 6
ToanDN
als Antwort auf: Inerin

You would need a long formula to cover all conditions.  Why not use a combined parameter in the schedule?

Nachricht 4 von 6
barthbradley
als Antwort auf: ToanDN


@ToanDNwrote:

You would need a long formula to cover all condition.  Why not use a combined parameter in the schedule?


 

...not only very long, but in the correct evaluation order.  Might not even be possible.  

Nachricht 5 von 6
FAIR59
als Antwort auf: Inerin

No need to have complex formula, you can let Revit do the work for you in the schedule.

  • In the family create a shared Text-Parameter for every yes/no parameter you wish to schedule.
  • Define the text for the parameter with a simple formula, a value if ticked, empty if not ticked.
  • In the (project) schedule, add a combined parameter, adding all the previous made TextParameters, using a comma as separator.

All done

combined_param_interface.JPG

 

combined_param_family.JPG

Nachricht 6 von 6
Ilic.Andrej
als Antwort auf: Inerin

In case you choose to do it with one formula:

 

 

if (and(Oranges,Red Peppers,Yellow Peppers,HNW_Door_PushPull),
   "Orange Bananas,Red,Yellow,Push Pull",
   if (and(Oranges,Red Peppers,Yellow Peppers),
      "Orange Bananas,Red,Yellow",
      if (and(Oranges,Red Peppers),
         "Orange Bananas,Red",
         if (Oranges,
            "Orange Bananas",
            if (Red Peppers,
               "Red",
               if (Yellow Peppers,
                  "Yellow",
                  if (HNW_Door_PushPull,
                     "Push Pull",
                     "-"
                  )
               )
            )
         )
      )
   )
)

 

The condensed:

 

if (and(Oranges,Red Peppers,Yellow Peppers,HNW_Door_PushPull),"Orange Bananas,Red,Yellow,Push Pull",if (and(Oranges,Red Peppers,Yellow Peppers),"Orange Bananas,Red,Yellow",if (and(Oranges,Red Peppers),"Orange Bananas,Red",if (Oranges,"Orange Bananas",if (Red Peppers,"Red",if (Yellow Peppers,"Yellow",if (HNW_Door_PushPull,"Push Pull","-")))))))

 



Andrej Ilić

phonetical: ændreɪ ilich
MSc Arch

Autodesk Expert Elite Alumni

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report