We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-07-20 04:00 PM
Hello
I'm working on a custom label.
I need to know the location of the reference line from a wall (or plane from a slab) so the label is always placed perfectly next to the element.
Is this possible?
In this post the "WALL_REFLINE_OFFSET" is requested at Graphisoft, for now without result?
2023-07-20 11:16 PM
I created a label for straight walls, where the label is placed directly on top of the walls surface on both sides as 2D-Fill to mark the walls surface..
I had to do a lot of Case distinctions.
I needed the following parameters:
- WALL_DIRECTION
- WALL_FLIPPED
- WALL_POSITION[1]
- WALL_POSITION[2]
Maybe you do not need this if you always want to place on the reference line.
For label positioning use this:
add2 LABEL_POSITION[2][1] + LABEL_POSITION[3][1],
LABEL_POSITION[2][2] + LABEL_POSITION[3][2]
2023-07-25 04:46 PM
Thanks Joachim for the reply.
The ADD2 LABEL_POSITION... is unfortunately not enough 😞.
I know the struggle with the WALL_DIRECTION and WALL_FLIPPED parameters from a previous label, it worked out eventualy.
Do you compare the WALL_POSITION[1] with the LABEL_POSITION[1][1] to know the offset distance?
2023-08-03 09:53 PM
Here is a part of my script:
! Position des Etiketts bezogen auf den Ursprung
_dict_x = LABEL_ASSOC_ELEM_GEOMETRY.referenceLine2D.contour.edges[1].begPoint.x
_dict_y = LABEL_ASSOC_ELEM_GEOMETRY.referenceLine2D.contour.edges[1].begPoint.y
! Position der Wand bezogen auf den Ursprung
wall_pos_x = WALL_POSITION[1]
wall_pos_y = WALL_POSITION[2]
! Differenzwerte X-Y der Positionen Wand zu Etikett
diff_dict_x = (_dict_x - wall_pos_x)
diff_dict_y = (_dict_y - wall_pos_y)
I am doing different case distinctions like this:
IF ABS(WALL_DIRECTION - 90) < eps THEN ! S E N K R . U N T E N
IF diff_dict_x < 0 THEN diff = diff* (-1)
! ......................... !
IF WALL_FLIPPED = 1 THEN dist_C_value = 0 ELSE dist_C_value = 1
mul2_2_values = -1
mal_wert_value = 1
ENDIF
IF ABS(WALL_DIRECTION - 180) < eps THEN ! W A A G. R E C H T S
IF diff_dict_y > 0 THEN diff = diff* (-1)
! ......................... !
IF WALL_FLIPPED = 1 THEN dist_C_value = 0 ELSE dist_C_value = - 1
mul2_2_values = 1
mal_wert_value = 1
ENDIF
2023-08-07 11:03 AM
Thanks Joachim for the help.
I think I can continue my search with this. For the time being I have already been able to create a well-functioning label, not yet with all the desired functionalities, but that is for later when I have / get some time again.