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

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

emodderman
Advocate Advocate
14,805 Views
25 Replies
Message 1 of 26

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

emodderman
Advocate
Advocate

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...

 

0 Likes
14,806 Views
25 Replies
Replies (25)
Message 2 of 26

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

Isn't it a conflict in itself?
0 Likes
Message 3 of 26

emodderman
Advocate
Advocate

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. 

0 Likes
Message 4 of 26

barthbradley
Consultant
Consultant

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. 

0 Likes
Message 5 of 26

barthbradley
Consultant
Consultant

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

0 Likes
Message 6 of 26

ToanDN
Consultant
Consultant

@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?

0 Likes
Message 7 of 26

emodderman
Advocate
Advocate

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... 

0 Likes
Message 8 of 26

barthbradley
Consultant
Consultant

1 and 0 will force on and off

0 Likes
Message 9 of 26

emodderman
Advocate
Advocate

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. 

0 Likes
Message 10 of 26

ToanDN
Consultant
Consultant

Capture.PNG

Message 11 of 26

BIM.Consultant
Advocate
Advocate

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

BIM Consultant
Message 12 of 26

emodderman
Advocate
Advocate

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.

0 Likes
Message 13 of 26

ToanDN
Consultant
Consultant
I believe TT can be on by itself by checking the Check TT box.
0 Likes
Message 14 of 26

BIM.Consultant
Advocate
Advocate
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.
BIM Consultant
0 Likes
Message 15 of 26

emodderman
Advocate
Advocate

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

0 Likes
Message 16 of 26

emodderman
Advocate
Advocate

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

0 Likes
Message 17 of 26

ToanDN
Consultant
Consultant

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.

 

0 Likes
Message 18 of 26

emodderman
Advocate
Advocate

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

0 Likes
Message 19 of 26

ToanDN
Consultant
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.

0 Likes
Message 20 of 26

barthbradley
Consultant
Consultant

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!

0 Likes