We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

GDL
About building parametric objects with GDL.
SOLVED!

Values limiting integer

Alex C
Contributor

Hi, I am trying to use VALUES to limit the input of parameters mn1 and mn2 to be greater than zero, so that I don't get errors in my 2D script. I set up the Values range in my parameter script, and they do seem to be preventing me from imputing a zero while I am within the object editor. When I actually load the object a project it will still let me enter a zero. Does anyone know why this might be happening? Thanks

 

 

VALUES	"mn1" RANGE (0,)
VALUES	"mn2" RANGE (0,)

 

 

Screen Shot 2024-07-03 at 11.08.32 AM.png

MAC OS Monterey AC27
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
runxel
Legend

I cannot reproduce that. You can type it in, but Archicad will always swap it out for the next possible number.

The screenshot shows exactly that. It's a hint, that you can only type in numbers greater than 0.

 

If you do not like that, do this instead:

VALUES	"mn1" RANGE [1,)

 

runxel_0-1720021622629.png

 

Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

View solution in original post

2 REPLIES 2
Solution
runxel
Legend

I cannot reproduce that. You can type it in, but Archicad will always swap it out for the next possible number.

The screenshot shows exactly that. It's a hint, that you can only type in numbers greater than 0.

 

If you do not like that, do this instead:

VALUES	"mn1" RANGE [1,)

 

runxel_0-1720021622629.png

 

Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

That's what I thought, it was getting swapped out for a number great than 0 in the object itself, but once I had it in a project the value was no longer being swapped out. I attached a screen recording just for reference. I tried changing the range value to a number greater than zero, like 3, and it still would bump it up to a 4 in the object, but in the project it would behave like its greater than or equal to 3.

 

Changing it to actually be greater than or equal to 1 did the trick though, thanks for the help.

MAC OS Monterey AC27