cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Wrapping Text For Faux Label

Anonymous
Not applicable
I would like to create a GDL that looks like the standard text label, but gets is text from the object it's attached to. The picture below demonstrates what I want. The 4"x4"... text will exist in the Column's parameters.

I've seen how this can be done with the Label tool and a single line of text, or a typical marker shape, but I want it to look and act like the standard (text) Label tool -- which means the ability to wrap, and the user can change the wrap width. I'm not familiar with the Rich Text functions, so can somebody please point me in the right direction?

LabelSample.gif
3 REPLIES 3
TomWaltz
Participant
Jay wrote:
I would like to create a GDL that looks like the standard text label, but gets is text from the object it's attached to. The picture below demonstrates what I want. The 4"x4"... text will exist in the Column's parameters.

I've seen how this can be done with the Label tool and a single line of text, or a typical marker shape, but I want it to look and act like the standard (text) Label tool -- which means the ability to wrap, and the user can change the wrap width. I'm not familiar with the Rich Text functions, so can somebody please point me in the right direction?
I think what you would need is a variable that holds the entire string and a stretchable hotspot that controls the width of the note.

You would then need to calculate how many words fit in the width at the current scale, and place them one line at a time.

You can do all of this with the basic TEXT2 function. I do not believe the new RICHTEXT function can do any kind of linewrapping, but I could be wrong.
Tom Waltz
Frank Beister
Mentor
You have to define PARAGRAPHs, whch are different styled snippets of text. This PARAGRAPHs you merge by their name to TEXTBLOCKs. This you can place with the RICHTEXT2 command.
Yes, line wrapping, spacing, tabulators, left/right margin etc. is possible. But it is much more complex than TEXT2. No fast answer from me. Try it an post the code, if you run in troubles.
Do you know, how you get the information from the main object?
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
To get the information from the main object, in the Label code you must have a REQUEST call like the following...
iReturn = REQUEST("ASSOCLP_PARVALUE", "Material_DCA", NameInd, iType, iFlag, iDim1, iDim2, sNote)
...where "Material_DCA" is the parameter whose value I want. sNote will contain the value.