We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

GDL
About building parametric objects with GDL.

Hard code custom window opening direction?

Mats_Knutsson
Advisor
Hi,
When I model a window and save the library part as a window... is there a way to open the object and hard code opening direction so I can use that parameter in schedules and labels?
Best,
Mats


EDIT: I was really clumsy writing orientation as in north south... when I was meaning hanging/direction left/right etc. Sorry for that!
AC 25 SWE Full

HP Zbook Fury 15,6 G8. 32 GB RAM. Nvidia RTX A3000.
8 REPLIES 8
Barry Kelly
Moderator
Short answer - no.

Longer answer - when you place a window you choose the position in the wall (the reveal side) and then the direction the window faces (inside/outside) and orientation (left/right).
So even though you create a custom window that opens on one side, you can still place it with the orientation so it opens from the other side.
So it can still be a left or right handed window.
The autotext and schedules use this orientation and it is not parameter or variable you can set as a user as it simply reflects how you place the window in plan.


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
similar to what Barry said: short answer - no

I use to have the orientation populate a parameter but that was when it was ok to use GLOB_NORTH_DIR in the parameter script.
I still have the script in Infinite Openings but as you can see its hidden because the GLOB_NORTH_DIR causes an error:
!!!WINDOW ORIENTATION
!ANGLE1 = GLOB_NORTH_DIR
!ANGLE2 = WALL_DIRECTION + SYMB_ROTANGLE + 90 !The Window is 90 deg perpendicular to the wal
! 
!ANGLE2 = ANGLE2 % 360
! 
!ANGLE_DIFF = ANGLE1 - ANGLE2
!IF ANGLE_DIFF > 180 THEN
!                ANGLE_DIFF = ANGLE_DIFF - 360
!ELSE
!                IF ANGLE_DIFF < -180 THEN ANGLE_DIFF = ANGLE_DIFF + 360
!ENDIF
! 
!WD_ORIENT = ""
! 
!IF ABS(ANGLE_DIFF) <= 22.5 THEN WD_ORIENT = "N"
!IF ANGLE_DIFF > 22.5 AND ANGLE_DIFF <= 67.5 THEN WD_ORIENT = "NE"
!IF ANGLE_DIFF > 67.5 AND ANGLE_DIFF <= 112.5 THEN WD_ORIENT = "E"
!IF ANGLE_DIFF > 112.5 AND ANGLE_DIFF <= 157.5 THEN WD_ORIENT = "SE"
!IF ANGLE_DIFF > 157.5 AND ANGLE_DIFF <= 180 THEN WD_ORIENT = "S"
!IF ANGLE_DIFF < -22.5 AND ANGLE_DIFF >= -67.5 THEN WD_ORIENT = "NW"
!IF ANGLE_DIFF < -67.5 AND ANGLE_DIFF >= -112.5 THEN WD_ORIENT = "W"
!IF ANGLE_DIFF < -112.5 AND ANGLE_DIFF >= -157.5 THEN WD_ORIENT = "SW"
!IF ANGLE_DIFF < -157.5 AND ANGLE_DIFF >= -180 THEN WD_ORIENT = "S"
! 
!PARAMETERS gs_list_custom5 = WD_ORIENT
Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website: https://cadswift.com.au/
YouTube: https://www.youtube.com/user/CADSwift/playlists
Mats_Knutsson
Advisor
Barry wrote:
Short answer - no.

Longer answer - when you place a window you choose the position in the wall (the reveal side) and then the direction the window faces (inside/outside) and orientation (left/right).
So even though you create a custom window that opens on one side, you can still place it with the orientation so it opens from the other side.
So it can still be a left or right handed window.
The autotext and schedules use this orientation and it is not parameter or variable you can set as a user as it simply reflects how you place the window in plan.


Barry.
The issue arises when we have double windows where we want P as in pair instead of left or right. It could be pretty much anything. We've solved it by not using the automatic orientation but instead using a manual property. This is not fun on the larger projects with gazillions of objects.
AC 25 SWE Full

HP Zbook Fury 15,6 G8. 32 GB RAM. Nvidia RTX A3000.
Barry Kelly
Moderator
There was a time when you could set custom values for the orientation, but that doesn't seem to work any more.

So in your case you could have you could have "L" and "R" both changed to "P" (of course this would affect all placed windows even if not in a pair - if it worked).
But it doesn't seem to work any more.
It used to in older versions I am sure.
But definitely not since 22.



There is maybe another parameter but it seems to only work with doors.

ac_OpeningSide

I have not really investigated it, but here is a post where it was discussed.

https://archicad-talk.graphisoft.com/viewtopic.php?f=6&t=66085


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
Mats_Knutsson
Advisor
Barry wrote:
There was a time when you could set custom values for the orientation, but that doesn't seem to work any more.

So in your case you could have you could have "L" and "R" both changed to "P" (of course this would affect all placed windows even if not in a pair - if it worked).
But it doesn't seem to work any more.
It used to in older versions I am sure.
But definitely not since 22.



There is maybe another parameter but it seems to only work with doors.

ac_OpeningSide

I have not really investigated it, but here is a post where it was discussed.

https://archicad-talk.graphisoft.com/viewtopic.php?f=6&t=66085


Barry.
You're right it doesn't seem to work in 22. For "normal" windows there is an automatic/individual setting and that's what I would like for our custom ones as well but I have no idea how to do it or even if it's possible. Need to check with GS.
AC 25 SWE Full

HP Zbook Fury 15,6 G8. 32 GB RAM. Nvidia RTX A3000.
Barry Kelly
Moderator
Mats_Knutsson wrote:
You're right it doesn't seem to work in 22. For "normal" windows there is an automatic/individual setting and that's what I would like for our custom ones as well but I have no idea how to do it or even if it's possible. Need to check with GS.

This is interesting - I will try to look into this further but not having much luck when I open the objects - but I never have much luck with GS objects.

It seems in the "Descriptions" area of the settings you can choose between "Automatic" , "Reversed", or "Custom" for Window Orientation Definition.
This works for doors but not for windows.

In the attached image I have simply added an autotext label for "Orientation".


But when I open the object script I don't see the 'Window Orientation Definition' anywhere.
I fact the entire second half of the description list from the window settings is not there in the window script.
I wonder where they come from?
It seems this missing bit is what you need to add to your custom window.


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
Mats_Knutsson
Advisor
That's interesting!

I got the following link from our local support. Not sure if I can get something out of it and I don't have the time for deeper investigations.

http://gdl.graphisoft.com/tips-and-tricks/door-window-orientation
AC 25 SWE Full

HP Zbook Fury 15,6 G8. 32 GB RAM. Nvidia RTX A3000.
Minh Nguyen
Graphisoft Alumni
Graphisoft Alumni
Hi Barry,

Thank you for reporting the issue!

I'm wondering if you find the link from Mats useful? Personally, I'm not an expert in GDL, but after reading the article and playing around a bit, I found out that if the object already had ac_openingside parameter, the Compatibility option will not work.

Best regards,
Minh

Minh Nguyen
Technical Support Engineer
GRAPHISOFT