cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
GDL
About building parametric objects with GDL.

Wrapping Autotext <LAYOUTNAME> to a specified length in a GDL object

Gabor Szelei
Booster

Hello,
I want to create a drawing stamp in GDL.
I can't solve the following problem:

I want to write out the Layout ID and Layout name using Autotext.
I managed to solve this.
However, I can't solve the problem of how to wrap the Layout name if it is too long so that it fits.

The GDL object is in the upper part of the image, and the one I want to create is drawn manually in the lower part of the image.

GaborSzelei_0-1754328896569.png

 

What should I do? Please help me solve the question.

Thank you for your help.

g.

Versions 6.5 to 28, AMD Ryzen 9 3900x, 32GB ram, GeForce RTX 2070 super, Windows 10
4 REPLIES 4
vlahtinen
Advocate

Use the TEXTBLOCK command (and RICHTEXT2). The width of the text block is the second argument. Note also the fixed_height argument which controls whether the text block is scale dependent or not.

Lingwisyer
Guru

If you want to go further, instead of using Autotext, request the values. This will then allow you to use things like STW(sting_name) and SPLIT(sting_name, “Delimiter”, PartIndex) for greater control over formatting.

 

Ling.

AC22-28 AUS 3110Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win11 | R5 2600 | 16GB | GTX1660

Thanks Ling.
Could you tell me how I can get the values?

 

g.

Versions 6.5 to 28, AMD Ryzen 9 3900x, 32GB ram, GeForce RTX 2070 super, Windows 10

Oh, apparently n = request ("HomeDB_info", "", n, LayoutNumber, LayoutName, n) and ac_layoutname will not work unless you place the object directly on the layout... I have not used it before and I am not sure how others have tried using it. The GS revision object pulls change info from the layout when placed on a master, so I figure there should be a way...

AC22-28 AUS 3110Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win11 | R5 2600 | 16GB | GTX1660