cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How from GDL to learn the number of decimal places in the project settings

I need to change the number of decimal places in the GDL object according to the project settings .
How do I get this number?
Thank you.
6 Replies 6
JGoode
Expert
Tsepov wrote:
I need to change the number of decimal places in the GDL object according to the project settings .
How do I get this number?
Thank you.
rrr = REQUEST ("Area_dimension", "", format_string)
zzz = format_string

text2 0, 0, str(zzz, room_area)
Hope this helps
ArchiCAD 27

Windows 10
Anonymous
Not applicable
In my special team, the number of decimal places does not exist.
There is only a general request about the units.
Similarly, JGoode, but he pointed out the not quite right command, not about the calculations, but about the units of measurement.
qw=REQUEST ("Calc_area_unit", "", form_str)
AreaUN = form_str
Anonymous
Not applicable
A little not that. But it turned out that it works:
REQUEST ("Calc_area_unit", "", format_string)
Thank you so much !
JGoode
Expert
I copied the wrong piece of code...silly me. Thanks for clearing it up.
ArchiCAD 27

Windows 10
Anonymous
Not applicable
Friends, thank you very much!
I made it possible for my add-ons to automatically detect this.
In the apartment marker I will also make an opportunity.
It would be nice if the zone LSR marker also had a tick "get the number of decimal places from the project settings".
Anonymous
Not applicable
This code is work for assign num round digits to TS_ROUNDIGITS from project settings if needed
-------------------------------------------------------------------------------------------------------------------

Common script:

IF TS_GETNDIGITSFROMPRJ = 1 THEN
rrr = REQUEST ("Calc_Area_unit", "", format_string)
zzz = STRSUB(format_string,3,1)
SPLIT (zzz, "%n", nddd)
if (nddd > 0)AND(nddd < 4) then
TS_ROUNDIGITS = nddd
endif
ENDIF

Parameter script:

IF TS_GETNDIGITSFROMPRJ = 1 THEN
PARAMETERS TS_ROUNDIGITS=TS_ROUNDIGITS
ENDIF

---------------
Thank you again!)

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!