First time here? Check out the Help page!
1 | initial version |
I think you can sort of get what you want to do using this: LIGHTING-W/AREA = ( {if(#P("POLYGON")==#SI("EL1 Floor Polygon", "FLOOR","POLYGON"))then 1.0 else if (#P("POLYGON")==#SI("EL2 Floor Polygon", "FLOOR","POLYGON"))then 0.5 else no_default endif endif} )
This expression is based on the parent Floor Polygon U-name, rather than the parent Floor U-name. Additionally, you can't use an expression for "X" in the switch statement for "case X:", so you have to use a nested if-then instead which is messy. I have shown only two branches in my example, but you can greatly expand that. I don't know if there is a limit on number of nested if-then statements, or just a limit on number of characters for the user defined expression (I don't recall what that character limit is.)
2 | No.2 Revision |
I think you can sort of get what you want to do using this:
this:
LIGHTING-W/AREA = (
{if(#P("POLYGON")==#SI("EL1 Floor Polygon", "FLOOR","POLYGON"))then
1.0
else if (#P("POLYGON")==#SI("EL2 Floor Polygon", "FLOOR","POLYGON"))then
0.5
else
no_default
endif
endif} ))
This expression is based on the parent Floor Polygon U-name, rather than the parent Floor U-name. Additionally, you can't use an expression for "X" in the switch statement for "case X:", so you have to use a nested if-then instead which is messy. I have shown only two branches in my example, but you can greatly expand that. I don't know if there is a limit on number of nested if-then statements, or just a limit on number of characters for the user defined expression (I don't recall what that character limit is.)
3 | No.3 Revision |
This doesn't answer your actual question about referencing an object by name. However, I think you can sort of get what you want to do using this:
LIGHTING-W/AREA = (
{if(#P("POLYGON")==#SI("EL1 Floor Polygon", "FLOOR","POLYGON"))then
1.0
else if (#P("POLYGON")==#SI("EL2 Floor Polygon", "FLOOR","POLYGON"))then
0.5
else
no_default
endif
endif} )
This expression is based on the parent Floor Polygon U-name, rather than the parent Floor U-name. Additionally, you can't use an expression for "X" in the switch statement for "case X:", so you have to use a nested if-then instead which is messy. I have shown only two branches in my example, but you can greatly expand that. I don't know if there is a limit on number of nested if-then statements, or just a limit on number of characters for the user defined expression (I don't recall what that character limit is.)
4 | No.4 Revision |
This doesn't answer your actual original question about referencing an object by name. However, I think you can sort of get what you want to do using this:
LIGHTING-W/AREA = (
{if(#P("POLYGON")==#SI("EL1 Floor Polygon", "FLOOR","POLYGON"))then
1.0
else if (#P("POLYGON")==#SI("EL2 Floor Polygon", "FLOOR","POLYGON"))then
0.5
else
no_default
endif
endif} )
This expression is based on the parent Floor Polygon U-name, rather than the parent Floor U-name. Additionally, you can't use an expression for "X" in the switch statement for "case X:", so you have to use a nested if-then instead which is messy. I have shown only two branches in my example, but you can greatly expand that. I don't know if there is a limit on number of nested if-then statements, or just a limit on number of characters for the user defined expression (I don't recall what that character limit is.)