We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

zone areas - superscripts

KeesW
Advocate
I'd like my zone areas to appear as m(superscript 2) instead of m2. I know how to alter the GDL script but don't know how to code a superscript. Any clues?
Cornelis (Kees) Wegman

cornelis wegman architects
AC 5 - 26 Dell XPS 8940 Win 10 16GB 1TB SSD 2TB HD RTX 3070 GPU
Laptop: AC 24 - 26 Win 10 16GB 1TB SSD RTX 3070 GPU
7 REPLIES 7
Anonymous
Not applicable
The only way I can think of to get special characters into GDL text output would be to type them into the string value. I don't know if this will work. It seems fraught with peril though. Differences in typefaces (OpenType, TrueType, Postscript, etc.) might foul it up and platform differences might also be a problem.

The more reliable way would be to code the superscript a a separate bit of text, placed and scaled relative to the other. You know the height of the style used for the "m". You can get its width with the STW function. Create a new style for the superscript and adjust its position based on those values.
Anonymous
Not applicable
simpler solution:
most fonts have the characters "²" and "³"
you find them with the character map tool
for example in the arial font they are alt+0178 and alt+0179
so you dont need a separate string at a location that is hard to calculate
Anonymous
Not applicable
zucoc wrote:
simpler solution:
most fonts have the characters "²" and "³"
you find them with the character map tool
for example in the arial font they are alt+0178 and alt+0179
so you dont need a separate string at a location that is hard to calculate
This is fine if you can restrict the use to a font that works, assuming there are no cross platform issues, and that you can type the special characters into the script. I haven't tried this in Windows (that I can recall) but getting the GDL editor to recognize the alt+ combinations might be problematic.

But, if it works let us know.
Anonymous
Not applicable
on windows it works
you can enter the extended characters in the gdl script editor without problems

can not and will not try on mac
Anonymous
Not applicable
zucoc wrote:
on windows it works
you can enter the extended characters in the gdl script editor without problems

can not and will not try on mac
Thanks for the info. BTW: It does work on the Mac.
KeesW
Advocate
Thanks for the tips. I tried it witin the GDL scripts and it worked once. When I tried again, the 'alt+0178' generated a strange symbol in the script that converted into a question mark on the actual object. However, by creating a supercript text object in MS Word, it could be copied into the GDL script without difficulty.

Zones are a bit flakey aren't they? I am findig it hard to change patches from one type to another, without recreating the zones. I think that everything has been done right.
Cornelis (Kees) Wegman

cornelis wegman architects
AC 5 - 26 Dell XPS 8940 Win 10 16GB 1TB SSD 2TB HD RTX 3070 GPU
Laptop: AC 24 - 26 Win 10 16GB 1TB SSD RTX 3070 GPU
Frank Beister
Moderator
You are using AC9. So you could modify the script to change the usage of TEXT2 into RICHTEXT, which allows textformatting as the text on the plan. Including supersripted chars.
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