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.

Coordinates of Property Label 21

davidstonearchicad21
Contributor
Hi all. I would like to set the center co-ordinate of Property Label 21 to the center of the text.

At the moment its set at the bottom edge, which is where the extension line begins. I cant find the starting co-ordinate for the extension line.

My search through the code led me here:
"install_label_position":
! ------------------------------------------------------------------------------
! Label positioning - global behavior for Marker form Labels
! - origin is where AC gives, the table begins with top left anchor
! - orientation is rotated with the parent structure by default
! - without AC Arrow
!		- drawing the full symbol marker form
! 		- the origin is at the arrow peak
! 		- rotating with parent elem direction
! 		- Reference Point is cordinated by user
! - with AC Arrow
!		- drawing only the head text
!		- the origin is at the boundary
!		- handling of rotation is belongs to AC (AC_CustomReadabilty OFF)
!		- Reference Point is cordinated at Pointer tabpage
!
! LABEL_POSITION 	- position of the label
! 					- array[3][2] containing the coordinates of the 3 points defining the label position
!
! - the other transformations live in the label_marker_macro
! ==============================================================================

	nTrans = 0

	if LABEL_CUSTOM_ARROW then

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

	endif

return
I'm struggling to find the array holding the co-ordinates. Maybe they are called from the 'label_marker_macro'? Can this be edited?

Thanks
AC24



2 x Xeon E5-2667 v2 (16c/32t @ 3.3-4.0 GHz)

64Gb RAM(ECC) Quad channel 1333Ghz (next upgrade 1866Ghz)

Nvidia GeForce GTX 1080 Ti 11Gb

500Gb 840PRO SSD, 3 TB HDD (next upgrade PCIe NVMe SSD)
5 REPLIES 5
All labels relay on stack of macros - for some reasons it is easier to manage, but makes pain in the... when some simple modifications must be done.

Anyway - All You need to know - is the final label width&height and add those coords to:
	if LABEL_CUSTOM_ARROW then

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

	endif
Piotr
davidstonearchicad21
Contributor
Thank Piotr.

I've tried to wrap my head around it but i can't figure out how i those lines translate to a co-ordinate.

I can very happily draw lines for objects with co-ordinates such as 0.00000, 1.00000 and the same for hotspots, but unfortunately that makes no sense to me. Is LABEL_POSITION [2][1] an array or is it pointing to the macros you speak of ?
AC24



2 x Xeon E5-2667 v2 (16c/32t @ 3.3-4.0 GHz)

64Gb RAM(ECC) Quad channel 1333Ghz (next upgrade 1866Ghz)

Nvidia GeForce GTX 1080 Ti 11Gb

500Gb 840PRO SSD, 3 TB HDD (next upgrade PCIe NVMe SSD)
Barry Kelly
Moderator
The first number in the array is the label point.
The label has 3 points on the leader line.
The arrow head, the middle point and the text position.
I am not sure of the order - i.e. if the arrow is point 1 or 3.

The second number in the array it the point co-ordinate (1 = X and 2 = Y)

So ...
LABEL_POSITION [2][1] is point 2 'X' co-ordinate.
LABEL_POSITION [2][2] is point 2 'Y' co-ordinate.

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

This is just adding point 1 & 2 'X' values together and point 1 & 2 'Y' values together for ADD2 X, Y.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Number "2" is the pointer ("Obviously" )
and...if someone wishes to check if the label (with pointer) is "mirrored" (ie the pointer is on the right side) - it is the only way....and You have to check not for negative value of X of this point but the positive 😉 (print command shows negative...but check for positive little surprise)

Piotr
davidstonearchicad21
Contributor
Sorry guys my understanding is still not there

The position is contained in the array [3] with [3] [1] being X and [3] [2] being Y ?

I'm guessing the values are stored in [1] and [2] because when i change them in the code for example like this:

if LABEL_CUSTOM_ARROW then

add2 LABEL_POSITION [2][1] + LABEL_POSITION [3][0.5],
LABEL_POSITION [2][2] + LABEL_POSITION [3][0.5]

endif

..nothing happens.

I can't see the array in parameters to be able to make changes to the values stored within it, nor can i see it anywhere else.. also it seems important to note that i am NOT using a pointer, 'if LABEL_CUSTOM_ARROW' seems to suggest it's a situation when i am using a pointer.



...all i'm trying to achieve is moving the center point to the middle, like the image below. I'd like the current center, the black dot next to the 001, to be where the red dot is.
AC24



2 x Xeon E5-2667 v2 (16c/32t @ 3.3-4.0 GHz)

64Gb RAM(ECC) Quad channel 1333Ghz (next upgrade 1866Ghz)

Nvidia GeForce GTX 1080 Ti 11Gb

500Gb 840PRO SSD, 3 TB HDD (next upgrade PCIe NVMe SSD)