Door-Window orientation

There are two ways for setting the Door-Window Orientation:

  • using the settings in the Compatibility Options
  • using the fix named optional parameter ac_openingside.

The main difference between these methods is that the Opening Option set in Compatibility Options can neither be edited from GDL, nor by the user.

Compatibility Options

TipsAndTricks_CompatibilityOptionsMenu

The Door-Window Orientation can be set in Compatibility Options to Default, Reverse or Custom. Each library part can only have one type of orientation. The Opening Orientation is visible in the Interactive Schedule.

TipsAndTricks_Compatibility Options IS

This information cannot be edited from GDL but can be accessed in the WIDO_ORIENTATION global.
For example in 2D script:

pen gs_pen_2D
rect2 -A/2, 0, A/2, gs_frame_thk
text2 -A/2, 0, WIDO_ORIENTATION

TipsAndTricks_CompOptions2D

Using ac_openingside parameter

ac_openingside is a fix named optional string parameter which defines the Door/Window orientation for listing. If this parameter exists in the library part then ARCHICAD will ignore any settings of Compatibility Options/Orientation Displaying.
Using the ac_openingside provides different Opening Orientations for a library part. The Opening Orientation strings values can also depend on GDL parameters, such as "iOpeningType" parameter in the following example. If automatic Opening Orientations are required, they have to be handled in GDL parameterscript.

TipsAndTricks_ac_openingside IS

In the following example the "gs_list_orientationDef_m" parameter with the description of “Door Orientation Definition” is used for providing an option for the user to choose between Automatic and Custom Opening Orientation Definitions.
In the Automatic case the ac_OpeningSide values are set as the Default Orientation in Compatibility Options. If the user needs a Custom Opening Orientation then after choosing the Custom option of the gs_list_orientationDef_m the value of ac_OpeningSide can be set directly.

! iOpeningType parameter controls the Opening Type of the Door 
values{2} "iOpeningType"    1, `Side Hung`, 
                            2, `Side Hung Mirrored`,
                            3, `Fix`,
                            4, `Sliding`
 
! gs_list_orientationDef_m parameter controls the way of orientation settings 
values{2} "gs_list_orientationDef_m"	0, `Automatic`, 
                                        1, `Custom`

! Set orientation in predefined cases (Automatic) 
if gs_list_orientationDef_m = 0  then
    if iOpeningType = 1	then		! Side Hung 
        if SYMB_MIRRORED then 
            ac_OpeningSide = "R" 
        else 
            ac_OpeningSide = "L" 
        endif
    else
        if iOpeningType = 2 then	! Side Hung Mirrored
            if SYMB_MIRRORED then 
                ac_OpeningSide = "L" 
            else 
                ac_OpeningSide = "R" 
            endif
        else
            if iOpeningType = 3	then	! Fix
                ac_OpeningSide = "Fix"
            else			! Sliding
                ac_OpeningSide = "Sliding"
            endif
        endif
    endif
    parameters ac_OpeningSide = ac_OpeningSide
    lock "ac_OpeningSide" 
    hideparameter "ac_OpeningSide" 
else 
    ! Set custom case - the user can set orientation manually 
endif

The 2D script seen in Compatibility Options results the following:

TipsAndTricks_ac_opOrientation