We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-03-15 02:38 AM - edited 2023-03-25 01:57 AM
I have a label that I would like to know the origin of the door that it is labelling. What I have so far below. This works fine for a door in a straight wall at any rotation. When I come to a radial wall I can't seem to find any global parameters which will tell me where the door is since it only gives me the angle of the chord of the opening. Thinking I am trying to make this too complex, should I be using something else to get the origin of the door?
!1 remove rotation of label, labelautorotates to be readable
if (LABEL_ROTANGLE <=90 or LABEL_ROTANGLE >270) then
rot2 -LABEL_ROTANGLE
else
rot2 -LABEL_ROTANGLE + 180
endif
!2 return to origin
add2 -LABEL_POSITION[1][1], - LABEL_POSITION[1][2]
!3 move to start of wall position
add2 WALL_POSITION[1], WALL_POSITION[2]
!4 rotate to wall rotation, note this is the angle of opening chord in the wall between reveals
rot2 WALL_DIRECTION
!5 move to door position in wall
add2 SYMB_POS_X, 0
edit, removed symb_pos_Y from last add2, not needed.
2023-03-16 12:24 PM
Hi,
WIDO_POSITION is available in the parameter script of doors/windows, you can store it as a parameter, then read that from the label.
2023-03-18 02:39 AM
Thanks Peter, I want to read any door library part so I don't have control over what parameters that door has. Any other ideas?
2023-03-22 11:39 AM
Archicad library has ac_hole_position_angle too.
2023-03-25 03:15 AM
Thanks for your help on this Peter, just cant seem to work out what I need. See snapshot below, in the straight wall I can determine the origin of the door from within the label, but I just don't seem to have enough information to work door origin for a curved wall as shown in red. Items in black are known. What am I missing?
2023-04-01 04:07 AM
Anyone able to help on this please.
2023-04-04 06:05 PM - edited 2023-04-04 06:07 PM
It looks like we know enough things:
The red angle is ac_hole_position_angle in the Archicad Library. It can be read from the label using request("ASSOCLP_PARVALUE")
The green angle is WALL_DIRECTION or better LABEL_ASSOC_ELEM_ORIENTATION.
Marked with green crosshairs is your label's transformations without the last
add2 SYMB_POS_X, 0
So we know the start point of the red line, and its orientation (calculated from the green and red angles).
The blue distance is WIDO_ORIG_DIST, the distance from the wall center to the reveal depth. The wall radius could be calculated from this and WIDO_SILL. Probably there are difficulties here with handling the orientation.
Knowing the radius, we get the arc center on the red line, and the midpoint of the opening on the green line.
2023-05-10 08:26 AM
Thanks Peter for the direction. I got caught up in some other items and have come back to this.
I managed to calculate the radius however my problem now is knowing which side the reveal is on. WIDO_REVEAL_SIDE tells me if opposite but there is nothing that tells me the window is placed on the outside or inside edge of the wall. Not an issue for a straight wall but for curved this changes how WIDO_ORIG_DIST relates the inside and outside radius.
2023-05-11 12:47 PM
WALL_FLIPPED should help. It is 0 when the outside of the wall is to the left relative to the reference line direction. A curved wall's reference line always goes ccw around the center.
2023-05-24 02:39 AM
Hi Peter,
WALL_FLIPPED does not seem to change if the reveal side is changed?
I need to find out if the reveal is on the outside or inside radius of the curved wall so I can then work backwards from the WIDO_ORIG_DIST of the door and calculate the radius of the wall.