BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

GDL
About building parametric objects with GDL.
SOLVED!

How to set Real values in the parameter section GDL

Partha02
Contributor

Whenever I am using GDL and there need to set a Real value instead of an Integer, it always rounds up the number and sets the value as Integer. How can I set a Real type and also get the Real (not the rounded up) value in the parameter section?  gdl round.pnggdl round 2.png

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Barry Kelly
Moderator

For a height, I would be using a 'length' type parameter.

Then the decimal precision is set in your 'Working Units' in Project Preferences.

 

If you really want to use a 'Real Number' then the decimal precision will also be in the Working Units for 'Numbers without Units'.

 

Barry

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

View solution in original post

2 REPLIES 2
Solution
Barry Kelly
Moderator

For a height, I would be using a 'length' type parameter.

Then the decimal precision is set in your 'Working Units' in Project Preferences.

 

If you really want to use a 'Real Number' then the decimal precision will also be in the Working Units for 'Numbers without Units'.

 

Barry

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
vdentello
Advocate

Even though it shows rounded, it keeps the decimals "hidden" AFAIK.
You may also want to set a fixed value though parameter tab.

Archicad User Since 2013
GDL Developer
Experimenting with API
from Brazil
Learn and get certified!