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

STRING FUNCTIONS STR ( ) , STR ( ), and STR {2}

Anonymous
Not applicable
Hello,
I made a library part that measures and displays distances.
The precision can be set from one decimal place to the right
of the decimal point to six decimal places using the STR ( ) function.
This part displays correctly for all settings up to four decimal places
but if set to five or six decimal places in the STR command
the display shows the dimension rounded to two decimal places
but shows the number of places correctly but showing only zeros.
The STR {2} command is mentioned in the GDL manual but is very
unclear about how to use it or give any example of its use.
It seems that either the STR ( ) function is limited to four decimal place
precision or I must use the STR {2} which I don't know how to use.

Could someone please tell me if there is a precision limit to the STR function
or direct me to a more complete description of the STR {2} function
and it's use.
Thank you,
Peter Devlin
5 REPLIES 5
Frank Beister
Moderator
Hi Peter,

no, AFAIK there is no limitation inside the command to 4 digits. Normally I would now refer to selfGDL, but it is still in German. 😉

My version of a percision mesure tool you find here.

Can you post your command? I could see, what is going wrong.

STR(number, 12,10)

should work at least.

It looks like STR has a limitit by 10 digits in the fraction part. (What is 1/10 of a nanometer, which is one angstrom. If I may remark!

You can try to use FRA() to separate the fraction part, multiply by 10^n and stitch it together with the integer part by string addition. So you can add some dimension chains for electrons. 😉
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Anonymous
Not applicable
Hello Frank,
Great to hear from you. It has been a while.
Thank you for being willing to look at the code for this object.
Peter
vfrontiers
Advocate
Closest issue I can find on here...

I am trying to create a tag that displays a door dim as 3o8o... where the FEET can be any whole number and the inches is a whole number (up to 11)...

Is there a way to truncate / separate SYMB_A_SIZE into one number for Feet and one for inches? And have it display without the Feet (') or Inch(") symbol?
Duane

Visual Frontiers

AC25 :|: AC26 :|: AC27
:|: Enscape3.4:|:TwinMotion

DellXPS 4.7ghz i7:|: 8gb GPU 1070ti / Alienware M18 Laptop
vfrontiers
Advocate
Nevermind... I stole it from the BUILDER DIM.
Duane

Visual Frontiers

AC25 :|: AC26 :|: AC27
:|: Enscape3.4:|:TwinMotion

DellXPS 4.7ghz i7:|: 8gb GPU 1070ti / Alienware M18 Laptop
vfrontiers
Advocate
But, while I'm here...

Is there any way to CUSToMIZE a LEVEL DIMENSION? I am interested in adding some info to this dimension and having it calculate a HEIGHT DIFFERENCE...


I can't see a way..?
Duane

Visual Frontiers

AC25 :|: AC26 :|: AC27
:|: Enscape3.4:|:TwinMotion

DellXPS 4.7ghz i7:|: 8gb GPU 1070ti / Alienware M18 Laptop