BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Textblock scaling by glob_scale

JGoode
Advocate
How do I stop my text from scaling by glob_scale? there is no code to make it scale but it seems to do it automatically. It's a big inconvenience if placed on plan but the rest of the symbol doesn't show. Thanks
ArchiCAD 23

Windows 10
8 REPLIES 8
Erwin Edel
Rockstar
Look into Define Style{2}, Paragraph, Set Style, Textblock and Richtext2

It basically requires a fair bit of setting up, but with Textblock you can toggle fixed height.
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
Erwin Edel
Rockstar
Also depending on the complexity of the object, I've found it quite easy to draw the 2D symbol and script layer visibilty in the 2D script to make the object parametric to my needs. This means you can just set up the text in the 2D window the way you like.

A couple of IF...THEN statements with FRAGMENT2 and a mul2 to stop mirroring is generally all I need for simple 2D objects like electrical symbols, fire safety etc
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
JGoode
Advocate
Erwin wrote:
Also depending on the complexity of the object, I've found it quite easy to draw the 2D symbol and script layer visibilty in the 2D script to make the object parametric to my needs. This means you can just set up the text in the 2D window the way you like.

A couple of IF...THEN statements with FRAGMENT2 and a mul2 to stop mirroring is generally all I need for simple 2D objects like electrical symbols, fire safety etc
The object is only for layouts so it works perfectly fine for that. The issue is if someone places it on plan for whatever reason and it multiplies only the text by glob_scale automatically. The 2D symbol around it still shows however it it's multiplied by glob_scale, and I don't want it to be. I didn't know if there was a way to stop the text from scaling automatically.
ArchiCAD 23

Windows 10
Erwin Edel
Rockstar
If the content of the textblock is scripted, then you need to go through all the statements I listed to set it up. Best to refer to the GDL Reference Guide to see a sample code or look up each statement, as they tend to have a lot of parameters.

If the text is just some plain text, you could try just drawing the symbol in the 2D symbolic screen of object and add a few of the 2D symbol statements I mentioned in 2D script to help it behave with changing size, mirroring and such.
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
Erwin Edel
Rockstar
I should add that layout and model views will act very annoying with objects though. Most of my simple 2D objects will look rediculous due to the view effectively being scale 1:1, making most objects huge in layout.

Not sure what the object does, but I have my north arrows, title blocks and such as worksheets that I place on the master / layout for this reason.

Also means that I only have to change the one worksheet and it will change on all my masters.
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
Palawat
Advocate
In the 2D script, you can give out a warning. Something like :

if glob_view_type <> 8 then
text2 0, 0, "Please place this object on Layout only."
endif

HTH.
Archicad 26, Windows 10, Corei7 3.4 GHz, 16 GB Ram.
https://www.indigofigs.com
https://www.facebook.com/indigofigs
Barry Kelly
Moderator
When you DEFINE the font style in your script , you set the font size.
You need to divide (or it may be multiply) this by the GLOB_SCALE (or A_).

You may also need to divide/multiply the text position by GLOB_SCALE as well if the text is to be a desired offset from the object.

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
Anonymous
Not applicable
Hi JGoode,
look at GDL-Manual and search (CONTROL+F) for "GLOB_SCALE".
At command "STW" you will find explanation. You have to multiple or divide. Make try and error in your script to DEFINE STYLE.
If you use milimeters for textsize input in UI then 1000*100.

IF GLOB_SCALE > 200 THEN !!! If scale is bigger than 1:200, make
!fixed textsize
TEXTSIZE = klaTreTXTsize * 1000*100/GLOB_SCALE
ELSE
TEXTSIZE = klaTreTXTsize * 1000
ENDIF
PEN klaTreTXTfa
DEFINE STYLE "KlapptreppeTXT" "ISOCPEUR", TEXTSIZE , 5, 0
SET STYLE "KlapptreppeTXT"
ADD2 0, TEXTSIZE / 1000*GLOB_SCALE
TEXT2 0, 0, "Klapptreppe"
DEL 1

Regards Mario
Learn and get certified!

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!