BasicWindowPanel Macro
1. General Description
A window can use this macro to draw its panels in 2D or 3D in ArchiCAD. The panels can be fixed as well as non-fixed. The images in the following table represent a 4-panel (3 top+1 bottom arrangement) straight window in different kind of walls shown in 2D floor plan and in axonometric 3D views.
![]() |
![]() |
![]() |
![]() |
2. Parameters
This macro has similar input parameters as a normal ArchiCAD window:
| Name | Type | Description | Mode used in | ||||
|---|---|---|---|---|---|---|---|
| A | Width | Width of window panel. | 2D / 3D | ||||
| gs_widthTotal | Length | Total width of opening. | 2D / 3D | ||||
| B | Height | Height of window panel. | 3D only | ||||
| WOD | Length | Distance of the wall-origin from the chord of the panel. | 2D / 3D | ||||
| gs_IsCurved | Boolean | Does the panel follow the curvature of the wall? | 2D only (yet!) | ||||
| gs_bWallOnLeft | Boolean | Is there a wall on the left side of the panel? | 2D / 3D | ||||
| gs_bWallOnRight | Boolean | Is there is a wall on the right side of the panel? | 2D / 3D | ||||
| --- | --- | Frame and Sash Definition | |||||
| gs_bFrameLeft | Boolean | Should draw a frame on the left side of the panel? | 2D / 3D | ||||
| gs_bFrameRight | Boolean | Should draw a frame on the right side of the panel? | 2D / 3D | ||||
| gs_bFrameTop | Boolean | Should draw a frame on the top side of the panel? | 3D only | ||||
| gs_iPanelType | Integer | Type of the panel (0 - fix, 1 - casement, 2 - edwardian/double hung) | 2D / 3D | ||||
| gs_frame_thk | Length | Frame thickness of the panel. | 2D / 3D | ||||
| gs_frame_width | Length | Frame width of the panel. | 2D / 3D | ||||
| gs_sash_thk | Length | Sash frame thickness of the panel. | 2D / 3D | ||||
| gs_sash_width | Length | Sash frame width of the panel. | 2D / 3D | ||||
| gs_angleOpen | Angle | Sash opening angle. | 3D only | ||||
| gs_glass_thk | Length | Glass thickness. | 3D only | ||||
| bOpeningDirection | Boolean | Opening Direction
|
2D / 3D | ||||
| gs_2D_representation | Title | 2D Representation | |||||
| lod2D | Integer | Level of detail in 2D (0..4) | 2D only | ||||
| gs_pen_2D | Pencolor | Panel pen. | 2D only | ||||
| gs_frame_pen_cont | Pencolor | Pen of the frame contour. | 2D / 3D (Section View) | ||||
| gs_fillFr | Fillpattern | Frame fill pattern type | 2D / 3D (Section View) | ||||
| gs_penFr_fg | Pencolor | Frame fill foreground pen | 2D / 3D (Section View) | ||||
| gs_penFr_bg | Pencolor | Frame fill background pen | 2D / 3D (Section View) | ||||
| gs_fillSh | Fillpattern | Sash fill pattern type | 2D / 3D (Section View) | ||||
| gs_penSh_fg | Pencolor | Sash fill foreground pen | 2D / 3D (Section View) | ||||
| gs_penSh_bg | Pencolor | Sash fill background pen | 2D / 3D (Section View) | ||||
| gs_fillShCover | Fillpattern | Sash fill pattern type for bottom side | 2D | ||||
| gs_penShCov_fg | Pencolor | Sash fill foreground pen for bottom side | 2D | ||||
| gs_penShCov_bg | Pencolor | Sash fill background pen for bottom side | 2D | ||||
| gs_3D_representation | Title | 3D Representation | |||||
| lod3D | Integer | Level of detail in 3D (0..2) | 3D only | ||||
| edgeMask | Integer | 12 bit mask of visible edges. | 3D only | ||||
| gs_frame_pen | Pencolor | Frame pen. | 3D only | ||||
| gs_sash_pen | Pencolor | Sash pen. | 3D only | ||||
| gs_glass_pen | Pencolor | Glass pen. | 3D only | ||||
| gs_window_material | Title | Materials | |||||
| gs_frame_mat | Material | Frame material. | 3D only | ||||
| gs_sash_mat | Material | Sash material. | 3D only | ||||
| gs_glass_mat | Material | Glass material. | 3D only | ||||
| ac_details | Title | AC Details | |||||
| ac_left_oversize | Length | Left opening oversize (width of Trim). | 2D / 3D | ||||
| ac_right_oversize | Length | Right opening oversize (width of Trim). | 2D / 3D | ||||
| ac_upper_oversize | Length | Upper opening oversize (width of Trim). | 3D | ||||
| ac_lower_oversize | Length | Lower opening oversize (width of Trim or Sill). | 3D | ||||
| gs_window_stack | Title | Windows can be combined to form a large glazed units. In this case the following parameters allows the user to turn off generating Trim, Sill and Board elements on the related sides. | - | ||||
| gs_stack_left | Boolean | Connection on the Left | 2D / 3D | ||||
| gs_stack_right | Boolean | Connection on the Right | 2D / 3D |
Thickness and width values
To clear the meanings of the thickness and width parameters used in ArchiCAD windows, see the following picture:
| Abbreviation | Corresponding parameter |
|---|---|
| T | gs_frame_thk |
| W | gs_frame_width |
| ST | gs_sash_thk |
3. Usage
Parameters sent to the WallLogic macro
The gs_widthTotal value is is usually the A value of the caller window. It is used by the WallLogic macro to calculate the side angle of the radial wall-cut which is required to achieve correct frame-wall angle for straight windows in curved walls (if either gs_bWallOnLeft or gs_bWallOnRight value is nonzero).
The caller must transform the local coordinate system to the center of the chord
of the panel (CE line). Hence, the macro assumes the current local origin is at
point D , and the (x', y') axes are already transformed to (x,
y). The following example represents a 2-panel curved window in a curved wall,
bisecting the wall opening:
The implementation of the desired transformation can be read at the WallLogic macro, too. Drawing the left panel of this sample window in 2D is done this way:
WOD = abs(WIDO_ORIG_DIST) call "WallLogic" PARAMETERS gs_macro_version = 10, EPS = 0.0001, A = SYMB_A_SIZE, ! this is the total width of the sample window WOD = WOD, RETURNED_PARAMETERS mirrorX, ! WOD is the OA distance mirrorY, curvedWall, wallIsLeft, angOrig, iRadius, ofsX, ofsY mul2 mirrorX, mirrorY ! (x', y') => (x, y) if curvedWall then ! the OD distance dOD = WOD / cos (angOrig) * cos(angOrig / 2) ! the chord of the panel dCE = 2 * WOD / cos (angOrig) * sin (angOrig / 2) add2 ofsX, ofsY ! move to 'B' rot2 angOrig add2 0, -iRadius ! move to 'O' rot2 -angOrig / 2 add2 0, dOD ! move to 'D' else dOD = WOD ! the OD distance dCE = A / 2 ! the chord-length of the panel add2 -A / 4 endif call "Window Macro" PARAMETERS A = dCE, gs_widthTotal = A, ! pass the total width WOD = dOD, gs_IsCurved = 1, ! draw a curved panel if possible gs_bWallOnLeft = 1, ! frame fits to the left wall side gs_bWallOnRight = 0, ! right side touches an other panel gs_bFrameLeft = 1, gs_bFrameRight = 0, gs_bFixedSash = 1, ! only fixed panels can be curved gs_frame_thk = gs_frame_thk, gs_frame_width = gs_frame_width, gs_fillFr = gs_fillFr, gs_penFr_fg = gs_penFr_fg, gs_penFr_bg = gs_penFr_bg, gs_sash_thk = gs_sash_thk, gs_sash_width = gs_sash_width, lod2D = lod2D, gs_pen_2D = gs_pen_2D del top
Hotspots
The macro places hotspots only at the frame corners of each panel it is called on:
![]() |
![]() |
Frame toggle
The gs_bFrameLeft, gs_bFrameRight and gs_bFrameTop parameters controll the existence of the left, right and top frames, respectively. By the way, the sash frame will never dissapear in case of non-fixed sashes. Note, that the following example panels will always fit the A x B sized rectangular opening, irrespectively of their omitted frames:
![]() |
![]() |
![]() |
![]() |
Level of detail in 2D
The lod2D value controlls the panel's level of detail in 2D drawings. If it is zero, no panel will be drawn at all. The following figure shows the available values (and the suggested scales of usage):
| lod2D | Scale | Panel with fixed sash | Panel with non-fixed sash |
|---|---|---|---|
| 1 | > 1:100 | ![]() |
![]() |
| 2 |
1:100 - 1:51
(type_A) |
![]() |
![]() |
| 3 |
1:100 - 1:51
(type_B) |
![]() |
![]() |
| 4 | < 1:50 | ![]() |
![]() |
The width of the visible frames are different in lower details depending on the gs_bFixedSash value: it is "gs_frame_width" for fixed panels and "gs_frame_width / 2 + gs_sash_width" for non-fixed ones.
Note, that the frame fill appears only at the highest level of detail.
Level of detail in 3D
The lod3D value controls the panel's level of detail in 3D views. If it is zero, no panel will be drawn at all. There are only two detail levels (1 or 2):
| 1 (Simple) | 2 (Detailed) |
|---|---|
![]() |
![]() |
Note, that fixed panels always use the simple manner in 3D.
Mask of edges
The edgeMask value controls the visibility of the frame edges of the panel
in 3D views. This is a 12 bit length integer, each bit controls one part of the frame perimeter. This
figure shows a one-panel window without its sash for easier intelligibility:
The numbers are the bit positions in edgeMask.
For example: if there are two neighboring panel that are adjacent horizontally, then the left one has
to clear the edgeMask at position 6, 7 and 8, while
the right one should have 0., 1. and 2. bits cleared.
If you call the macro this way, then the result won't have any exasperating lines between the frames in 3D views.
4. Remarks
The A and WOD input values are immediately passed to the WallLogic macro (now it is called on panels as virtual windows).
It returns the required information to draw the panel and place the hotspots:
call "WallLogic" parameters EPS = EPS, A = A, WOD = WOD
Curved panels
There is no use placing a curved panel in a straight wall. Now only the 2D representation can be drawn for curved panels: that is only straight panels will be drawn in 3D at the moment.
Note, that only fixed panels can be curved (according to the assumption based on real windows).



















