BasicWindowPanelStraight 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 |
| B | Height | Height of window panel. | 3D |
| gs_iPanelType | Integer | Type of the panel (0 - fix, 1 - casement, 2 - edwardian/double hung) | 2D / 3D |
| gs_nominal_size_jamb_inner | Boolean | Nominal Size = Jamb Inner Size. | 2D / 3D |
| --- | --- | Frame Definition | |
| gs_frame_thk | Length | Frame thickness of the panel. | 2D / 3D |
| gs_frame_width | Length | Frame width of the panel. | 2D / 3D |
| gs_frame_cut_width | Length | Frame Cut Width. | 2D / 3D |
| gs_frame_cut_depth | Length | Frame Cut Depth. | 2D / 3D |
| gs_bFrameLeft | Boolean | Draw Frame on Left Side | 2D / 3D |
| gs_bFrameRight | Boolean | Draw Frame on Right Side | 2D / 3D |
| gs_bFrameTop | Boolean | Draw Frame on Top Side | 3D |
| gs_frame_ovhg_left_out | Length | Left Outside Overhang. | 2D / 3D |
| gs_frame_ovhg_right_out | Length | Right Outside Overhang. | 2D / 3D |
| gs_frame_ovhg_top_out | Length | Top Outside Overhang. | 3D |
| gs_frame_ovhg_bottom_out | Length | Bottom Outside Overhang. | 3D |
| gs_frame_ovhg_left_in | Length | Left Inside Overhang. | 2D / 3D |
| gs_frame_ovhg_right_in | Length | Right Inside Overhang. | 2D / 3D |
| gs_frame_ovhg_top_in | Length | Top Inside Overhang. | 3D |
| gs_frame_ovhg_bottom_in | Length | Bottom Inside Overhang. | 3D |
| --- | --- | Sash Definition | |
| gs_sash_thk | Length | Sash Frame Thickness. | 2D / 3D |
| gs_sash_width | Length | Sash Frame Width. | 2D / 3D |
| gs_angleOpen | Angle | Opening Angle. | 3D |
| gs_glass_thk | Length | Glass Thickness. | 3D |
| --- | --- | 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 |
| --- | --- | 3D Representation | |
| lod3D | Integer | Level of detail in 3D (0..2) | 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 |
| --- | --- | 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 |
Thickness and width values
To clear the meanings of the thickness and width parameters used in ArchiCAD windows, see the following picture:
Frame overhang values
To clear the meanings of the frame overhang parameters, see the following picture:
2D and section attributes
3. Usage
2D Script
In this script, the window object has to contain the following code portion.
In addition, it has to empty the transformation stack before calling this macro (e.g. with a del top command)
hotspot2 0, 0 call "BasicWindowPanelStraight.gsm", parameters A = A, gs_iPanelType = 1, gs_frame_thk = gs_frame_thk, gs_frame_width = gs_frame_width, gs_frame_cut_width = 0, gs_frame_cut_depth = 0, gs_bFrameLeft = 1, gs_bFrameRight = 1, gs_frame_ovhg_left_out = gs_frame_ovhg_left_out, gs_frame_ovhg_right_out = gs_frame_ovhg_right_out, gs_frame_ovhg_left_in = gs_frame_ovhg_left_in, gs_frame_ovhg_right_in = gs_frame_ovhg_right_in, gs_sash_thk = gs_sash_thk, gs_sash_width = gs_sash_width, lod2D = lod2D, gs_pen_2D = gs_pen_2D, gs_frame_pen_cont = gs_frame_pen_cont, gs_fillFr = gs_fillFr, gs_penFr_fg = gs_penFr_fg, gs_penFr_bg = gs_penFr_bg, gs_fillSh = gs_fillSash, gs_penSh_fg = gs_penSash_fg, gs_penSh_bg = gs_penSash_bg, gs_fillShCover = 65, gs_penShCov_fg = 91, gs_penShCov_bg = 91
3D Script
In this script, the window object has to contain the following code portion.
In addition, it has to empty the transformation stack before calling this macro (e.g. with a del top command)
call "BasicWindowPanelStraight.gsm", parameters A = A, B = B, gs_iPanelType = 1, gs_frame_thk = gs_frame_thk, gs_frame_width = gs_frame_width, gs_frame_cut_width = 0, gs_frame_cut_depth = 0, gs_bFrameLeft = 1, gs_bFrameRight = 1, gs_bFrameTop = 1, gs_frame_ovhg_left_out = gs_frame_ovhg_left_out, gs_frame_ovhg_right_out = gs_frame_ovhg_right_out, gs_frame_ovhg_top_out = gs_frame_ovhg_top_out, gs_frame_ovhg_bottom_out = gs_frame_ovhg_bottom_out, gs_frame_ovhg_left_in = gs_frame_ovhg_left_in, gs_frame_ovhg_right_in = gs_frame_ovhg_right_in, gs_frame_ovhg_top_in = gs_frame_ovhg_top_in, gs_frame_ovhg_bottom_in = gs_frame_ovhg_bottom_in, gs_sash_thk = gs_sash_thk, gs_sash_width = gs_sash_width, gs_angleOpen = gs_angleOpen, gs_glass_thk = gs_glass_thk, gs_pen_2D = gs_pen_2D, gs_frame_pen_cont = gs_frame_pen_cont, gs_fillFr = gs_fillFr, gs_penFr_fg = gs_penFr_fg, gs_penFr_bg = gs_penFr_bg, gs_fillSh = gs_fillSash, gs_penSh_fg = gs_penSash_fg, gs_penSh_bg = gs_penSash_bg, lod3D = lod3D, gs_frame_pen = gs_frame_pen, gs_sash_pen = gs_sash_pen, gs_glass_pen = gs_glass_pen, gs_frame_mat = gs_frame_mat, gs_sash_mat = gs_sash_mat, gs_glass_mat = gs_glass_mat
Hotspots
The macro places hotspots only at the frame corners of each panel:
Frame toggle
The gs_bFrameLeft, gs_bFrameRight and gs_bFrameTop parameters control the existence of the left, right and top frames, respectively. By the way, the sash frame will never disappear 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 controls 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):
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.









