cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

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

Can Zones be made to write in Superscript?

Anonymous
Not applicable
I want Zones to display room area in square meters, using the shorter version of it : m2, with "2" in superscript. I also want it to be displayed in cyrillic - small cyrillic "m" is like capital latin "M".

Zone stamp is Zone_Stamp_02 10 on AC10.

Can you share any ideas?

sq.jpg
23 REPLIES 23
Anonymous
Not applicable
Here is a very good question...

Anybody...
Laszlo Nagy
Community Admin
Community Admin
I actually checked this but after the first look I said it is pretty long to do it.
But I can explain it to you the GDL behind it.
So: the format in which Area Text is written out by the Zone Stamp is acquired using a REQUEST function in GDL.
Check this script from the 2D SCript of Zone_Stamp_02 11.gsm:

area_form = "" ! Format as set in the Preferences
rrr = request ("Area_dimension", "", area_form)
room_area = str (area_form, Temp_CalcArea)
gross_area = str (area_form, Temp_GrossArea)



The line starting with "rrr..." uses a REQUEST function to read what format is set in Project Preferences for Area dimensions and loads this info to the area_form variable. So area_form will contain the format of the area value. By format we mean number of characters, number of decimal places or fractions of inch, plus units of measurement, such as meters or feet-inches.
The room_area and gross_area lines create the Text strings using this format.
All the available variations that can be returned by the format tring can be found in the GDL Reference Guide in the STR command under String Functions.
You would have to check whether the unit in the format string is "m2", then take apart the string into two pieces (e.g. "12.50 m2" into "12.50m" and "2") and you would have to generate the "2" with a smaller font and a bit raised relative to the main text of the dimension.
So it can be done but it is not fast or easy or simple.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27
Anonymous
Not applicable
Actually it is more simple than I expected...

1. In the 2d window, insert a text box;
2. In the text box, insert the symbol that you want ( for example ³ or a cyrillic one) and select it with copyclip;
3. In the 2d script of the zone object, find the unit string definition (something like " m2", select the "2" and paste the symbol.
4. That's it!

You can do the same procedure with a custom/static area!
Laszlo Nagy
Community Admin
Community Admin
I see what you mean.
At label 1002 of the 2D Script it defines the units like "m2", "cm2" etc.
I tried this copy-paste thing you wrote about but it did not work for me.
The character that was displayed was a question mark or some other strange character.
Could this be some character coding problem?
Would be nice if it worked because it is a pretty good and simple solution.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27
vistasp
Advisor
It worked when I tried it - thank you Paulo. I didn't use the cut-paste method but directly put in the "²" character (Alt+0178 on a Windows system. BTW, "³" is Alt+0179).

Just out of interest, Laszo, what character were you using that returned a "?"

It may be an encoding problem but there is also the possibility that the font you were using for the zone stamp simply didn't have a definition for that particular character.

When I use - say - Arial, the superscript appears correctly. However, when I use another font which doesn't have that character defined, I get a square box instead (right side of the attached image).

Hope this helps.
= v i s t a s p =
bT Square Peg
https://archicadstuff.blogspot.com
https://www.btsquarepeg.com
| AC 9-27 INT | Win11 | Ryzen 5700 | 32 GB | RTX 3050 |
vistasp
Advisor
One thing cropped up during this issue which I don't understand. Actually there are lots of things I don't understand about GDL but...

In the 2D script of the area units of the zone stamp, why is mm2 given twice? Additionally, in the volume units, how come there are no cubic feet or cubic inches?


1002:                                           !*** Area unit strings

   if strstr (form, "sqm") then unit = " m2"
   if strstr (form, "sqcm") then unit = " cm2"
   if strstr (form, "sqmm") then unit = " mm2"
   if strstr (form, "sqmm") then unit = " mm2"
   if strstr (form, "sqf") then unit = " sq ft"
   if strstr (form, "sqi") then unit = " sq inch"

return

1003:                                           !*** Volume unit strings

   if strstr (form, "cum") then unit = " m3"
   if strstr (form, "cucm") then unit = " cm3"
   if strstr (form, "cumm") then unit = " mm3"

return
= v i s t a s p =
bT Square Peg
https://archicadstuff.blogspot.com
https://www.btsquarepeg.com
| AC 9-27 INT | Win11 | Ryzen 5700 | 32 GB | RTX 3050 |
Anonymous
Not applicable
You're welcome Vistasp.

I agree with you with the encoding problem that Laszo is experiencing...

I tried this with arial font, but I think that if the symbol appears correctly in the 2d it should work when pasted in another place, shouldn't it?...
Anonymous
Not applicable
Thank you very much, guys!
I will try it right away and post the results.
Rob
Graphisoft
Graphisoft
and you would have to generate the "2" with a smaller font and a bit raised relative to the main text of the dimension.
this is the only reliable approach AFAIK.

Any use of special characters is prone to errors due to different coding of fonts (as you have already discovered anyway).
::rk