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: 

If (not(and... statement in a family.

25 ANTWORTEN 25
Antworten
Nachricht 1 von 26
emodderman
9960 Aufrufe, 25 Antworten

If (not(and... statement in a family.

Hello, 

 

I have a problem with a set of parameters in a family. I want to turn things on and off and usually I can figure it out, but this time I'm stumped. 

 

situation:

I have three parameters: TT, PC and SF.

if SF is ON, then i need PC and TT to be OFF.

if PC is ON, then TT should be ON and SF is OFF.

if TT is ON, then PC and SF are OFF.

 

I have attached an image of the closest I have gotten to something that works, and it isn't very close. but at least it isn't giving me errors. 

 

if(StickFrame, not(and(TopTrack, ParapetCover)), if(ParapetCover, TopTrack, False))

 

I have created a "checking" parameter and a false parameter, but I'm not sure I really need them. Maybe I need more parameters... I was trying to keep this simple, but I guess I can't...

 

25 ANTWORTEN 25
Nachricht 2 von 26
ToanDN
als Antwort auf: emodderman

"if PC is ON, then TT is ON
if TT is ON, then PC is OFF"

Isn't it a conflict in itself?
Nachricht 3 von 26
emodderman
als Antwort auf: ToanDN

well, no. but it what is causing my problems in the formulas here. 

 

TT is independent of PC. so it can be ON without PC being on, 

 

but PC can only be on if TT is also on. 

Nachricht 4 von 26
barthbradley
als Antwort auf: emodderman

Something like this...

 

PC = not(SF_CTRL)

SF = not(PC)

SF_CTRL = no formula***

TT = and(not(SF),PC) 

 

*** SF_CTRL is your"Check" Parameter.  This parameter is controlling the visibility, not SF. 

Nachricht 5 von 26
barthbradley
als Antwort auf: ToanDN

good eye ToanDN; I'll didn't catch that. 

Nachricht 6 von 26
ToanDN
als Antwort auf: emodderman


@emodderman wrote:

if PC is ON, then TT should be ON...



@emodderman wrote:

 

TT is independent of PC. so it can be ON without PC being on, 

 


I see TT is definitely dependent  of PC.  Unless your definition of "should be" is "may be".  Clarify?

Nachricht 7 von 26
emodderman
als Antwort auf: barthbradley

So , this gives me half of what I need.  It keeps SF and (TT&PC) as opposite conditions, 

 

but on top of that, i need TT and PC to maintain some autonomy. so when SF is off, TT can be turned on without PC, but when PC is turned on it also turns on TT with it. 

 

here is what i wish i could say in one if statement, but in english.

 

IF SF is ON then TT and PC are OFF otherwise IF PT is ON then TT is on, otherwise TT is on.

 

so i have this:

if(SF, not(and(TT, PC)), if(PC, TT, False))

if SF is on then TT and PC are off otherwise if PC is ON, then TT is ON otherwise False is on.

(False is like... an overflow parameter because i always needed an IF TRUE and IF FALSE... 

 

 

aside from a Not(param), how do i force a parameter to be ON? 

 

the more i discuss this, the less optimistic i become... 

Nachricht 8 von 26
barthbradley
als Antwort auf: emodderman

1 and 0 will force on and off

Nachricht 9 von 26
emodderman
als Antwort auf: ToanDN

ok so picture this as a curtain wall panel. 

 

i have a top track that is on and ready for another curtain panel on top of it, until it gets to the top of the wall and then the parapet cover goes on. 

 

so TT is on when PC can be off, but if someone turns on PC, then TT has to be on with it. I can't have my parapet cover on without my top track on. 

 

the top track is turned off only when a third mullion is turned on, SF, in which case PC can't be on because TT is off. 

Nachricht 10 von 26
ToanDN
als Antwort auf: emodderman

Capture.PNG

Nachricht 11 von 26
BIM.Consultant
als Antwort auf: emodderman

This is my way of doing it. The parameter PC1_SF2_TT3 should have a value of either 1,2 or 3. We can't use if condition with a text so I had to use an integer. The parameter "Now Showing" is not necessary and can be deleted. I only made it there to tell the user what is being shown now. I also attached the family for your reference.

PC1_SF2_TT3.png

Nachricht 12 von 26
emodderman
als Antwort auf: ToanDN

ToanDN:

 

almost but not quite... TT still can't be on by itself... unless I'm doing something wrong. 

 

BIM.Consultant:

 

this works. i don't love the unknown nature of using the integer parameter, but yes, i was thinking this would be the way it would end up... i'm going to try to take this one step further to make something a little more user friendly than just the integer. i want something that will force the integer into a state... this will mean more parameters, but maybe... just maybe! 

 

i'll post my results. 

 

thank you both for working through this with me. i was definitely over complicating it but trying to make it all one formula.

Nachricht 13 von 26
ToanDN
als Antwort auf: emodderman

I believe TT can be on by itself by checking the Check TT box.
Nachricht 14 von 26
BIM.Consultant
als Antwort auf: ToanDN

I made it to have only 1 input field, and everything else will automatically adjust. If we will open it to many checkboxes and inputs, then we can simply drop the formulas and the user can check whatever he needs.
Nachricht 15 von 26
emodderman
als Antwort auf: ToanDN

ToanDN:

I had to add a not (SF) to the Check TT box in order to get it to turn the SF off, but now it works fine. so the visibility of the Top Track is tied to the Check TT parameter, while the other two elements are tied to ParapetCover and StickFrame.  


so now i just have to rename things so that they are understandable in the properties for the user.

extra.png

Nachricht 16 von 26
emodderman
als Antwort auf: BIM.Consultant

BIM.Consultant:

 

I tried adding some on off params that would be easier for the user to select and that would drive the integer param.. it *almost* works. but back to square one with the conflicting on off bits... so i guess i'll use a tool top for the integer information. 

 

almost.png

Nachricht 17 von 26
ToanDN
als Antwort auf: emodderman

Your are slightly different.

 

Check TT should have no formula.

 

TT = if(SF, 1<2, Check TT)

 

TopTrack = if(PC, 1 < 2, TT)

 

 

Try it.

 

P/S: I have tried with all the conditions that you have given and they all work. If you find any that do not work.  Post a screenshot of it and I will have a look.

 

Nachricht 18 von 26
emodderman
als Antwort auf: ToanDN

hm. i musta changed that TT formula to Check PC instead of Check TT. so yes, it does work. 

Nachricht 19 von 26
ToanDN
als Antwort auf: BIM.Consultant

@BIM.Consultant

 

That is not entirely true.  I have three check boxes for input, the rest is driven by formulas.  For the worst scenario he only needs to check two boxes.  For most cases, he only needs to check one box or even none.  So, it is not the same as dropping all formulas and have three manual check boxes with no relationship to each others.

 

Your solution clearly has its pros but it also has some cons.  Thing is I choose not to point them out because it is not up to me to judge.  IMHO talking down on other solutions to show you are more superior may not be the best way to elevate yourself, unless you are running for the US President.

Nachricht 20 von 26
barthbradley
als Antwort auf: ToanDN

Calm down Boys. IMO, you both should get credit (kudos) for participating and offering solutions.

 

...and, If one of you ARE considering a run for president, we could use an alternative candidate this year. HA!

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