BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Collaboration with other software
About model and data exchange with 3rd party solutions: Revit, Solibri, dRofus, Bluebeam, structural analysis solutions, and IFC, BCF and DXF/DWG-based exchange, etc.

Any way to change a decimal separator of a list?

felcunha
Expert
Hello all,
I'm using zone lists to feed a GDL object.
These lists use comma as decimal separator because this is the standard rule in France... like this :
LGT01 ; 02 ; Living  ;         6,35 ; Main
But, GDL doesn't recognize the comma as a separator and ignores all the decimals.
Does someone know if there's a way to change the way decimal separators are set in AC without having to change the global parameters in the OS system ?

Thanks in advance,
Felipe Ribeiro Cunha

AC 26, macOS Monterey
4 REPLIES 4
Barry Kelly
Moderator
felcunha wrote:
Does someone know if there's a way to change the way decimal separators are set in AC without having to change the global parameters in the OS system ?
Unfortunately it is an OS setting and can't be controlled in Archicad itself.

But GDL does not need to recognise the decimal point as a separator.
It is a number and therefore has an integer and decimal component already.
If you are trying to convert the number to a string, then you set the number of decimal places that you want to use.

In your example the semi-colon (;) is the separator.

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
felcunha
Expert
Hello Barry,
Yes but I need to get the whole number for my calculations in my object.
In my example, I want to get the 6.35 value to make math operations. Therefore, GDL does not recognize the comma as the decimal separator and gets only the "6" number.
I'd like to find a way to convert the commas into dots otherwise than using complex GDL code. (and even then I don't know if I could easily do!!)
Felipe Ribeiro Cunha

AC 26, macOS Monterey
Barry Kelly
Moderator
GDL will recognise the comma or point as the decimal point.
The problem may be that in the list you are getting the information from the 6,35 may actually be two numbers separated by a comma?

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
felcunha
Expert
Barry wrote:
GDL will recognise the comma or point as the decimal point.
The problem may be that in the list you are getting the information from the 6,35 may actually be two numbers separated by a comma?

Barry.
No, I only get the integer numbers of it. I'll check what can be the problem... maybe a Mac OS issue??
Felipe Ribeiro Cunha

AC 26, macOS Monterey
Learn and get certified!