Defining window properties using if-then statements

5 posts / 0 new
Last post

I'm trying to automatically adjust my window size based on a global
parameter called "Glazing Percentage". The width of the window is fixed
and the height is defined by the following expression:

4.47*(#PA("Glazing Percentage")/0.4)

However, a large glazing percentage leads to problems since the larger
window takes up space in the plenum. So I want to fix this by adjusting
the Y coordinate of the window. To do this, I tried creating the
following expression:

if (#PA("Glazing Percentage") == 0.4)
then #L("Y") = 4.37
else #L("Y") = 4.37 - (1.12*("#PA("Glazing Percentage) - 0.4))
endif

When glazing percentage is set to 0.4, the above expression sets Y to
0.00. As soon as I change it to says 0.5, eQuest crashes.
The math is correct, but there's something wrong with my syntax. Can
anyone please help?

I've attached the pd2 and inp files for reference.

Thanks,
Luka

Matutinovic, Luka's picture
Joined: 2011-09-30
Reputation: 0