cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Parameter with 2 values.

Cosminn
Contributor
Hello everyone, I would like to have one parameter with 2 different values for 2 situations.
1. with one value from 1 to infinity
2. should be no value, only empty text.

What kind of parameter should i choose? I mean should be "real number" or "text value *(that one with the ABC icon)"?

Please see attached. I am not sure about the script command. Hope you will understand what i mean.

Thanks a lot,

Daniel

Script.JPG
Sincerely,
Daniel
3 REPLIES 3
David Maudlin
Rockstar
Daniel:

I cannot follow what you are trying to accomplish. Is the number a real number, an integer? Is the empty text field for custom text entry? Perhaps if you give a fuller description of what the goal is for, then someone will have better ideas for varied solutions.

You should add a Signature to your Profile (click the Profile button near the top of this page) with your ArchiCAD version and operating system (see mine for an example) for more accurate help in this forum.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
sinceV6
Advocate
Hi.

Each parameter can only have a single type, be it REAL or TEXT. In your case, you must create two different parameters, and in the scripts select the value to use according to what you need.

Something like:

valueToBeUsed = ""

IF thisConditionIsMet THEN
   valueToBeUsed = theREAL_parameter
ELSE
   valueToBeUsed = theTEXT_parameter
ENDIF
Best regards.
rocorona
Booster
it REALLY depends of the intended use.

If you want to show a parameter only if it is non-zero, you can use the HIDEPARAMETER command:
IF TheValue=0 THEN HIDEPARAMETER "TheValue"
Or, in some other case, just use a TEXT parameter and set its value to " " (empty or a space) in one situation (hide-condition met) or to a "written number" with the STR function:

IF TheValue > 0 THEN
   PARAMETERS param = STR(TheValue, 3,2)
ELSE
   PARAMETERS param = ""
ENDIF
_________________

--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________