Custom Number of values, DIM?
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-08-09 07:00 AM
2013-08-09
07:00 AM
Hoping someone can help me with the DIM command.
Below is a script I am using to work out the height of the risers in my stairs.
The maximum riser height I want is 190mm and the minimum is 115mm (excuse my metric)
smax1 = stairheight/0.190
smin1 = stairheight/0.115
smax = int(smax1)+1
smin = int(smin1)
ropt1 = stairheight/smax
ropt2 = stairheight/(smax+1)
ropt3 = stairheight/(smax+2)
ropt4 = stairheight/(smax+3)
I am then using these 'ropt' values in my parameter script. Although on smaller stairs the ropt4 may be smaller than the minimum size allowed
Now, I know there is a way that I can only display the values between these numbers but I am unsure how. Is there a basic DIM command someone can suggest. Sorry if I am being rude asking such an open question.
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-08-09 09:50 AM
2013-08-09
09:50 AM
The DIM command is for the declaration of an Array.
You need to use VALUES with RANGE, e.g.
VALUES hgth RANGE[0.11, 0.19]
You need to use VALUES with RANGE, e.g.
VALUES hgth RANGE[0.11, 0.19]
Jochen Suehlo . AC12-28 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
GDL object creation: b-prisma.de
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-08-09 01:18 PM
2013-08-09
01:18 PM
Thanks, but do I need to use an array to choose from choices of text in a parameter? As this is ideally what Im after.
Can range only control numerical input?
Can range only control numerical input?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-08-09 06:44 PM
2013-08-09
06:44 PM
RANGE can only act with numerical values.
But you can define an Array dynamically by the script,
which can build the base of a VALUS command.
Example:
!Master-Script
DIM water[]
IF condition1 THEN
water[1] = "blue"
water[2] = "yellow"
water[3] = "green"
ENDIF
etc.
!Parameter-Script
VALUES param1 water
But you can define an Array dynamically by the script,
which can build the base of a VALUS command.
Example:
!Master-Script
DIM water[]
IF condition1 THEN
water[1] = "blue"
water[2] = "yellow"
water[3] = "green"
ENDIF
etc.
!Parameter-Script
VALUES param1 water
Jochen Suehlo . AC12-28 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
GDL object creation: b-prisma.de
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-08-12 02:15 AM
2013-08-12
02:15 AM
Thankyou Joachim,
I have got something working. I probably should of been neater with a flow control statement, but work ok. (I actually have 10 possible parameters, but have shortened it for here)
The script works for Australian standards,
Maximum Riser Height = 190mm
Minimum Riser Height = 115mm
Maximum 2 x Risers + Going = 700mm
Minimum 2 x Risers + Going = 550mm
!Master Script
smax1 = stairheight/0.190
smin1 = stairheight/0.115
smax = int(smax1)+1
smin = int(smin1)
ropt1 = stairheight/smax
ropt2 = stairheight/(smax+1)
ropt3 = stairheight/(smax+2)
ropt4 = stairheight/(smax+3)
DIM risers[]
ii=0
if ropt1 > 0.115 and (2*ropt1)+going>0.550 and (2*ropt1)+going<0.7 then
ii=ii+1
risers[ii]=str("%0mm",ropt1)
endif
if ropt2 > 0.115 and (2*ropt2)+going>0.550 and (2*ropt2)+going<0.7 then
ii=ii+1
risers[ii]=str("%0mm",ropt2)
endif
if ropt3 > 0.115 and (2*ropt3)+going>0.550 and (2*ropt3)+going<0.7 then
ii=ii+1
risers[ii]=str("%0mm",ropt3)
endif
if ropt4 > 0.115 and (2*ropt4)+going>0.550 and (2*ropt4)+going<0.7 then
ii=ii+1
risers[ii]=str("%0mm",ropt4)
endif
!Parameter Script
values "riserheight" risers
I have got something working. I probably should of been neater with a flow control statement, but work ok. (I actually have 10 possible parameters, but have shortened it for here)
The script works for Australian standards,
Maximum Riser Height = 190mm
Minimum Riser Height = 115mm
Maximum 2 x Risers + Going = 700mm
Minimum 2 x Risers + Going = 550mm
!Master Script
smax1 = stairheight/0.190
smin1 = stairheight/0.115
smax = int(smax1)+1
smin = int(smin1)
ropt1 = stairheight/smax
ropt2 = stairheight/(smax+1)
ropt3 = stairheight/(smax+2)
ropt4 = stairheight/(smax+3)
DIM risers[]
ii=0
if ropt1 > 0.115 and (2*ropt1)+going>0.550 and (2*ropt1)+going<0.7 then
ii=ii+1
risers[ii]=str("%0mm",ropt1)
endif
if ropt2 > 0.115 and (2*ropt2)+going>0.550 and (2*ropt2)+going<0.7 then
ii=ii+1
risers[ii]=str("%0mm",ropt2)
endif
if ropt3 > 0.115 and (2*ropt3)+going>0.550 and (2*ropt3)+going<0.7 then
ii=ii+1
risers[ii]=str("%0mm",ropt3)
endif
if ropt4 > 0.115 and (2*ropt4)+going>0.550 and (2*ropt4)+going<0.7 then
ii=ii+1
risers[ii]=str("%0mm",ropt4)
endif
!Parameter Script
values "riserheight" risers