cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

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

Custom Label object inserts in wrong location

Franks3y
Participant

Hi Team,

 

I am new to GDL and am wondering if someone can point me in the right direction here.

I have created a new label from scratch to simply read a walls composite name and display the first code within a poly triangle.

 

It's all working smoothly except for the insertion point.

All other labels insert where I click except this one?

Insertion Point.JPG

It's likely an issue between keyboard and chair. Hoping someone can assist 🙂 

I have attached an empty pln with the object embedded if anyone can have a look at it.

 

Master Script:

 

 

 

HOTSPOT2 0, 0
HOTSPOT2 0.35, 0.6
HOTSPOT2 -0.35, 0.6

define style "Standard"	AC_TextFont_1, AC_TextSize_1, 8, AC_TextStyle_1

frame_fill = 1

 

 

 

2D script

 

 

 

! Get Comp Code
string = WALL_COMPS_NAME
iDotPos = STRSTR (string, ":")
iOutput = STRSUB (string, 1, iDotPos - 1)

! Set Text Style - Defined under Master script 
style "Standard"

! Write text box
TEXT2 0, 0.25, iOutput  ! Should return prefix seperated from Composite name by a ":"

POLY2 4, frame_fill, 0, 0, 0.35, 0.6, -0.35, 0.6, 0, 0

 

 

 


Insertion Point.JPG
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Stefan L_
Mentor

You need to eliminate the default leader line distance first.

Put this at the beginning of your 2D script:

 

add2 LABEL_POSITION[2][1],0
add2 LABEL_POSITION[3][1],LABEL_POSITION[3][2]

 

 

--
Stefan
AC ...-27, WIN10

View solution in original post

2 REPLIES 2
Solution
Stefan L_
Mentor

You need to eliminate the default leader line distance first.

Put this at the beginning of your 2D script:

 

add2 LABEL_POSITION[2][1],0
add2 LABEL_POSITION[3][1],LABEL_POSITION[3][2]

 

 

--
Stefan
AC ...-27, WIN10

Thanks Stefan, 

 

This is exactly what I am after, Cheers !