cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
License outage
Dear Customers, We are facing with an outage in our services in Azure. You may experience issues with the Azure-based functions, like licensing, BIMcloud SaaS, Learn Portal. We are working hard on this issue to make it fixed as soon as possible. Thank you for your patience.
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Custom Number of values, DIM?

Anonymous
Not applicable
Hi,

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
Jochen Suehlo
Advisor
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]
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
Anonymous
Not applicable
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?
Jochen Suehlo
Advisor
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
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
Anonymous
Not applicable
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