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.

GDL for a LABEL. help needed

NandoMogollon
Expert
Hi
First of all, I'm quite low on the Junior League when talking about GDL. So please be patient if you see something "obviously wrong".

Objective:
An Label object, with all my Specs as Values so my team can use only the specs listed. And if any of the specs changes, we can change it on the GDL , and it will be updated where it was used (any view when updated)

Problem:
As you can see on the image attached, I wanted to handle the style of the text using Paragraph and Textblock, and then Richtext. I've playing around with the numbers and I can't get the defined Style to be applied to the text shown.
Something else, When I do the same replacing the Variable "LABCON" with any text string, the Style works.

I really appreciate your help

Nando

Questions:
How should I do this instead of using textblocks? If using textblocks, Should I Set the Style in a different way?

Picture 1.png
Nando Mogollon
Director @ BuilDigital
nando@buildigital.com.au
Using, Archicad Latest AU and INT. Revit Latest (have to keep comparing notes)
More and more... IFC.js, IFCOpenShell
All things Solibri and BIMCollab
4 REPLIES 4
Ben Cohen
Advocate
try this at the top of the script

LABCON = "" + LABCON + ""

This should do the trick
Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au
Anonymous
Not applicable
Hello,

Might be useful to make a valuelist for just headers and then tag the
choosen value for autotexts. In that case the referenced content is
editable with autotexts without touching the label .gsm object.

For example the value list is;

!------------------------------------master script
dim texts[]
texts[1]= "Header 1"
texts[2]= "Header 2"
texts[3]= "Header 3"
texts[4]= "Header 4"
texts[5]= "Header 5"

values "LABCON" texts, custom

labeltext="<" + LABCON +">"
!-------------------------------------master script


Then you can use the "Project Info"-autotexts to generate and modify the references;
just use the same headers there.

The bad point is that autotexts are not library parts so you have to import /
export them manually from PLN to PLN.


Hope this helps

--
Regards, Juha
NandoMogollon
Expert
Hi all,
Thanks for the help on the previous post.

I've found a different approach to the problem: Instead of having one single Object, We have several Objects (Labels), Each one with a "Code Name".
So every Object has it's own Content-Text.

The advantage of this procedure is the "automatized" Specifications, in the Hole Project, Even in different Files when using Hotlinks and stand alone files for Details. We just need to share the Object folder on the server. Another advantage is the easy access to Change the Spec: Just open the object, and modify the text.

The Shadow side: We don't have a single "source" for all the Specifications and it's code name, it's something we have to do manually, So far the best tool is a spread sheet in Google Docs, so any one can modify the content in some Teamwork fashion.

Another good thing is the "Force Horizontal" option, so we can have vertical arrows, which is not possible with the standard Label Tool.(see the attached image).

Here you will find the Script, so if you find it interesting, you can use it.
--------------
DEFINE STYLE{2} TypA LABEL_FONT_NAME, LABEL_TEXT_SIZE*GLOB_SCALE/1000, LABEL_FONT_STYLE

PARAGRAPH "PARRAFO" LABEL_TEXT_ALIGN, .1, .1, .1, 1, 0
PEN LABEL_TEXT_PEN
SET STYLE "TypA"



!!!!-------->>>>>>>>>>>>>-------------- REPLACE THE TEXT BELOW --------<<<<<<<<<<<<<-------!!!!!

"Material,"
" "
"Size: Width x Height x Deep or Thickness, "
" "
"Element Type or Name, "
" "
"Purposes, "
" "
"Located at..."
" "
"Color and Finishes definition, "
" "
"Provider and reference, "
" "
"Installation or Construction notes."

!!!!-------->>>>>>>>>>>>>-------------- REPLACE THE TEXT ABOVE --------<<<<<<<<<<<<<-------!!!!!
!!!!-------->>>>>>>>>>>>>------- AND SAVE AS, WITH A DIFERENT NAME --------<<<<<<<<<<<<<-------!!!!!


ENDPARAGRAPH

IF LABEL_TEXT_ALIGN=1 THEN
GLAS=4
ENDIF

IF LABEL_TEXT_ALIGN=3 THEN
GLAS=6
ENDIF

IF LABEL_TEXT_ALIGN=2 THEN
GLAS=8
ENDIF

IF LABEL_TEXT_ALIGN=4 THEN
GLAS=4
ENDIF


IF HOR THEN
AGL=270
ELSE
AGL=0
ENDIF

TEXTBLOCK "FIFI" 80*GLOB_SCALE/1000, GLAS, AGL, 1, 1, 0, "PARRAFO"

RICHTEXT2 0,0, "FIFI"
------------------

Best Regards

Nando
Picture 2.png
Nando Mogollon
Director @ BuilDigital
nando@buildigital.com.au
Using, Archicad Latest AU and INT. Revit Latest (have to keep comparing notes)
More and more... IFC.js, IFCOpenShell
All things Solibri and BIMCollab
NandoMogollon
Expert
"NandoMogollon" wrote:

!!!!-------->>>>>>>>>>>>>-------------- REPLACE THE TEXT BELOW --------<<<<<<<<<<<<<-------!!!!!

"Material,"
" "
"Size: Width x Height x Deep or Thickness, "
" "
"Element Type or Name, "
" "
"Purposes, "
" "
"Located at..."
" "
"Color and Finishes definition, "
" "
"Provider and reference, "
" "
"Installation or Construction notes."

!!!!-------->>>>>>>>>>>>>-------------- REPLACE THE TEXT ABOVE --------<<<<<<<<<<<<<-------!!!!!
!!!!-------->>>>>>>>>>>>>------- AND SAVE AS, WITH A DIFFERENT NAME --------<<<<<<<<<<<<<-------!!!!!

Ideally, I would like to get back to the original idea of having a single object, and LINK each of the Texts above as Variables on an external file, like an excel file or a TXT file.
With the GDL TEXT I/O ADD-ON it may be possible, but is out of my area of knowledge.

In that case I would need to select the Spec wanted from a pop up menu on the settings of the label, not by choosing a different Label, but that's another story.

I'm a bit busy by now, and probably I won't have time to keep developing this object. Feel free to do it. Just let me know if any of you can find a way to do the "Linking Trick".

Best Regards

Nando
Picture 3.png
Nando Mogollon
Director @ BuilDigital
nando@buildigital.com.au
Using, Archicad Latest AU and INT. Revit Latest (have to keep comparing notes)
More and more... IFC.js, IFCOpenShell
All things Solibri and BIMCollab