Message 1 of 6

Not applicable
03-15-2017
11:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to determine the 1st and 2nd largest values out of 3 parameters. I am trying to use a nested if function to determine this, then write the values of the parameters to iProperties.
This is what I have so far.
If (ZDIM > XDIM) AndAlso (ZDIM > YDIM) Then iProperties.Value("Custom", "LENGTH")= Ceil(Parameter("ZDIM")) If YDIM>XDIM Then iProperties.Value("Custom", "WIDTH") = Ceil(Parameter("YDIM")) Else iProperties.Value("Custom", "WIDTH") = Ceil(Parameter("XDIM")) End If ElseIf (YDIM > XDIM) AndAlso (YDIM > ZDIM) Then iProperties.Value("Custom", "LENGTH")= Ceil(Parameter("YDIM")) If XDIM>ZDIM Then iProperties.Value("Custom", "WIDTH") = Ceil(Parameter("XDIM")) Else iProperties.Value("Custom", "WIDTH") = Ceil(Parameter("ZDIM")) End If ElseIf (XDIM > YDIM) AndAlso (XDIM > ZDIM) Then iProperties.Value("Custom", "LENGTH")= Ceil(Parameter("XDIM")) If YDIM>ZDIM Then iProperties.Value("Custom", "WIDTH") = Ceil(Parameter("YDIM")) Else iProperties.Value("Custom", "WIDTH") = Ceil(Parameter("ZDIM")) End If End If
I don't get any errors, and no values are written to iProperties.
Solved! Go to Solution.