Select A Value By Index
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2005-06-10 01:21 AM
2005-06-10
01:21 AM
VALUES Light_Frame_Qty `0`, `10`, `20`
IF Selected = `-` THEN
PARAMETERS Light_Frame_Qty = `0`
ELSE
PARAMETERS Light_Frame_Qty = [index2]
ENDIF
It's easy enough to use the value `10` in place of [index2] when there is only one of these, but if you have 20 very different parameters (and I do) it would be much quicker to code using the index.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2005-06-10 08:47 AM
2005-06-10
08:47 AM
Try this (from brain to keyboard, not tested):
DIM QTY_val [] QTY_val[1] = `0` QTY_val[2] = `10` QTY_val[3] = `20` VALUES Light_Frame_Qty QTY_val VALUES Selected 1,2,3 IF GLOB_MODPAR_NAME="Selected" THEN PARAMETERS Light_Frame_Qty = QTY_val[ MAX(1, MIN(Selected,VARDIM1(QTY_val) ) ] ENDIF
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm