Window Sill and Trim Macro
1. General Description
A window can use this macro to draw its sill, board and trims in 2D or 3D in ArchiCAD. The macro can manage the different kind of walls, eg. staright, trapezoid and curved walls.
2. Parameters
This macro has similar input parameters as a normal ArchiCAD window:
| Name | Type | Default | Scripts related to the parameter | Remarks |
|---|---|---|---|---|
| A | Length | 1 | 2D / 3D | Nominal width of the wall opening |
| B | Length | 1 | 3D | Nominal height of the wall opening |
| ZZYZX | Length | 1 | - | Not used |
| AC_show2DHotspotsIn3D | Boolean | 0 | - | Not used |
| ac_cw_function | Boolean | 0 | 2D / 3D | "Placement Type (1=CW,0=W)" |
| offsX | Length | 0 | 2D / 3D | Horizontal coordinate offset length |
| offsY | Length | 0 | 3D | Vertical coordinate offset length |
| gs_IsCurved | Boolean | 0 | 2D / 3D / Parameter | Curved state - Effective in case of curved walls only. |
| iWindowShape | Integer | 0 | 3D / Parameter |
Shape of the window.
|
| archHeight | Length | 0.25 | 3D | Height of the Arc. Only effective when iWindowShape = 1 |
| nArchResolution | Integer | 0 | 3D |
Arc resolution for arched windows. if nArchResolution < 3, WALL_RESOL used instead. |
| ac_corner_window | Boolean | 1 | 2D / 3D / Parameter | Switch to Corner Window mode |
| ac_corner_angle | Angle | 90 | 2D / 3D / Parameter | Angle of connected walls |
| ac_diff_con_wall_thk | Boolean | 0 | 2D / 3D / Parameter | Indicates the equality thickness of the two connected walls. |
| ac_con_wall_thk | Length | 0 | 2D / 3D / Parameter | Thickness of the another wall. |
| gs_window_frame | Title | --- | - | Window Frame |
| gs_frame_width | Length | 0.05 | Parameter | Width of the frame. Helps to determine the maximum thickness of the Sill and the Board. |
| gs_window_oversize | Title | --- | - | Oversize |
| gs_left_oversize | Length | 0 | 2D / 3D | Left Opening Oversize |
| gs_right_oversize | Length | 0 | 2D / 3D | Right Opening Oversize |
| gs_upper_oversize | Length | 0 | 3D | Upper Opening Oversize |
| gs_lower_oversize | Length | 0 | 3D | Lower Opening Oversize |
| gs_window_trim | String | "Both Sides" | Parameter | Trim side chooser |
| iTrim | Integer | 4 | 2D / 3D |
Identifies the Trims to be drawn on the window sides
|
| gs_trim_oversize | Boolean | 0 | 2D / 3D / Parameter |
Identifies the method as the macro handles the nominal opening sizes when Trims are turned on.
|
| gs_trim_width | Length | 0 | 2D / 3D / Parameter |
Width of the jamb extensions. If it's value is not 0, then gs_trim_width defines the width of trims on each sides, instead of gs_trim_width_in and gs_trim_width_out.
|
| gs_trim_width_in | Length | 0.025 | 2D / 3D / Parameter | Width of the interior jamb extensions. |
| gs_trim_width_out | Length | 0.015 | 2D / 3D / Parameter | Width of the exterior jamb extensions. |
| gs_trim_offs | Length | 0 | 2D / 3D / Parameter |
Trim Offset. If it's value is not 0, then gs_trim_offs define the offset of trims on each sides,
instead of gs_trim_offs_in and gs_trim_offs_out.
|
| gs_trim_offs_in | Length | 0.01 | 2D / 3D / Parameter | Trim Offset Inside |
| gs_trim_offs_out | Length | 0.01 | 2D / 3D / Parameter | Trim Offset Outside |
| gs_trim_thk | Length | 0 | 2D / 3D / Parameter |
Thickness of the casing. If it's value is not 0, then gs_trim_thk define the thickness of trims on each sides, instead of gs_trim_thk_in and gs_trim_thk_out.
|
| gs_trim_thk_in | Length | 0.025 | 2D / 3D / Parameter | Thickness of the interior casing |
| gs_trim_thk_out | Length | 0.02 | 2D / 3D / Parameter | Thickness of the exterior casing |
| gs_tw_left_in | Length | 0.05 | 2D / 3D / Parameter | Width of the interior casing on the left side. |
| gs_tw_right_in | Length | 0.15 | 2D / 3D / Parameter | Width of the interior casing on the right side. |
| gs_tw_top_in | Length | 0 | 3D | Width of the interior head casing. |
| gs_tw_bottom_in | Length | 0 | 3D | Width of the interior casing on the bottom side. |
| gs_tw_left_out | Length | 0.1 | 2D / 3D / Parameter | Width of the exterior casing on the left side. |
| gs_tw_right_out | Length | 0.05 | 2D / 3D / Parameter | Width of the exterior casing on the right side. |
| gs_tw_top_out | Length | 0 | 3D | Width of the exterior head casing. |
| gs_tw_bottom_out | Length | 0 | 3D | Width of the exterior casing on the bottom side. |
| bShowTrimInsideSplice | Boolean | 0 | 3D | Show or hide inside Trim's splice lines. |
| bShowTrimOutsideSplice | Boolean | 0 | 3D | Show or hide outside Trim's splice lines. |
| gs_window_sill | String | "Off" | Parameter | Sill side chooser |
| iSill | Integer | 1 | 2D / 3D | Identifies the Sill and Board to be drawn on the window sides
|
| gs_sill_oversize | Boolean | 0 | 3D / Parameter | Sill Oversize |
| gs_sill_type | String | "Timber Sill" | Parameter | Sill type chooser |
| iSillType | Integer | 1 | 2D / 3D |
Identifies the type of Sill
|
| gs_board_type | String | "" | Parameter | Type of the Board - For further development. |
| iBoardType | Integer | 1 | 2D / 3D | Type of the Board - For further development. |
| gs_sill_thk | Length | 0.025 | 3D / Parameter | Sill Thickness |
| gs_sill_nosing | Length | 0.03 | 2D / 3D / Parameter | Sill Nosing |
| gs_sill_angle | Angle | 3 | 3D / Parameter | Sill Angle |
| gs_sill_ovhg_left | Length | 0 | 2D / 3D / Parameter | "Sill Overhang Left" |
| gs_sill_ovhg_right | Length | 0 | 2D / 3D / Parameter | "Sill Overhang Right" |
| gs_sill_slip_in | Length | 0 | Sill Slip In Depth | |
| gs_sill_width | Length | 0 | Width of Sill Only for Brick Sill and Stone Sill |
|
| gs_sill_frame_nosing | Length | 0.02 | Only for Stone Sill | |
| gs_sill_frame_keep | Length | 0 | Only for Stone Sill | |
| gs_sill_curved | Boolean | 1 | 2D / 3D / Parameter | "Sill is Curved in Curved Walls" |
| gs_board_thk | Length | 0.025 | 3D / Parameter | Board Thickness |
| gs_board_nosing | Length | 0.03 | 2D / 3D / Parameter | Board Nosing |
| gs_board_angle | Angle | 0 | 3D / Parameter | Board Angle |
| gs_board_ovhg_left | Length | 0 | 2D / 3D / Parameter | "Board Overhang Left" |
| gs_board_ovhg_right | Length | 0 | 2D / 3D / Parameter | "Board Overhang Right" |
| gs_board_slip_in | Length | 0 | Board Slip In Depth Only Effective when gs_sill_oversize = 1 |
|
| gs_board_curved | Boolean | 1 | 2D / 3D / Parameter | "Board is Curved in Curved Walls" |
| bShowSillSplice | Boolean | 1 | 2D / 3D | Show or hide Sill splice lines in case of Corner Window |
| bShowBoardSplice | Boolean | 0 | 2D / 3D | Show or hide Board splice lines in case of Corner Window |
| gs_2D_representation | Title | --- | - | 2D Representation |
| lod2D | Integer | 1 | 2D |
Level of Detail in 2D
|
| gs_pen_2D | PenColor | 3 | 2D | 2D Contour Pen |
| gs_trim_pen_cont | PenColor | 0 | 2D, 3D (Section View) | Trim Contour Pen - If it is zero in 2D then gs_pen_2D defines the cutted contour pen.
If it is zero in 3D (Section View) then SYMB_SECT_PEN defines the cutted contour pen. |
| iWallContourLine | Integer | 0 | 2D | "Wall Contour Line" |
| gs_wcont_line_in | LineType | 4 | 2D | "Wall Contour Line Type Inside" |
| gs_wcont_line_out | LineType | 4 | 2D | "Wall Contour Line Type Outside" |
| gs_wallhole_fill | FillPattern | 65 | 2D | Wallhole Fill Type |
| gs_wallhole_pen_fg | PenColor | 0 | 2D | Wallhole Fill Pen |
| gs_wallhole_pen_bg | PenColor | 92 | 2D | Wallhole Fill Background Pen |
| gs_sill_fill | 0 | 3D (Section View) | Sill Fill Type - If it is zero in 3D (Section View) then SYMB_FILL defines the fill type of cutted surfaces. | |
| gs_sill_pen_fg | PenColor | 0 | 3D (Section View) | Sill Fill Pen - If it is zero in 3D (Section View) then SYMB_FILL_PEN defines the fill pen of cutted surfaces. |
| gs_sill_pen_bg | PenColor | 92 | 3D (Section View) | Sill Fill Background Pen - If it is zero in 3D (Section View) then SYMB_FBGD_PEN defines the fill background pen of cutted surfaces. |
| gs_board_fill | FillPattern | 0 | 3D (Section View) | Board Fill Type - If it is zero in 3D (Section View) then SYMB_FILL defines the fill type of cutted surfaces. |
| gs_board_pen_fg | PenColor | 0 | 3D (Section View) | Board Fill Pen - If it is zero in 3D (Section View) then SYMB_FILL_PEN defines the fill pen of cutted surfaces. |
| gs_board_pen_bg | PenColor | 0 | 3D (Section View) | Board Fill Background Pen - If it is zero in 3D (Section View) then SYMB_FBGD_PEN defines the fill background pen of cutted surfaces. |
| gs_trim_fill_in | FillPattern | 0 | 2D / 3D (Section View) | Trim Fill Type Inside - If it is zero in 3D (Section View) then SYMB_FILL defines the fill type of cutted surfaces. |
| gs_trim_pen_fg_in | PenColor | 7 | 2D / 3D (Section View) | Trim Fill Pen Inside - If it is zero in 3D (Section View) then SYMB_FILL_PEN defines the fill pen of cutted surfaces. |
| gs_trim_pen_bg_in | PenColor | 39 | 2D / 3D (Section View) | Trim Fill Background Pen Inside - If it is zero in 3D (Section View) then SYMB_FBGD_PEN defines the fill background pen of cutted surfaces. |
| gs_trim_fill_out | FillPattern | 0 | 2D / 3D (Section View) | Trim Fill Type Outside - If it is zero in 3D (Section View) then SYMB_FILL defines the fill type of cutted surfaces. |
| gs_trim_pen_fg_out | PenColor | 4 | 2D / 3D (Section View) | Trim Fill Pen Outside - If it is zero in 3D (Section View) then SYMB_FILL_PEN defines the fill pen of cutted surfaces. |
| gs_trim_pen_bg_out | PenColor | 59 | 2D / 3D (Section View) | Trim Fill Background Pen Outside - If it is zero in 3D (Section View) then SYMB_FBGD_PEN defines the fill background pen of cutted surfaces. |
| gs_3D_representation | Title | --- | - | 3D Representation |
| lod3D | Integer | 1 | 3D | Level of Detail in 3D - not used |
| gs_frame_pen | PenColor | 2 | 3D | Frame Pen |
| gs_window_material | Title | --- | - | Materials |
| gs_trim_in_mat | Material | 0 | 3D | Interior Trim Material |
| gs_trim_out_mat | Material | 0 | 3D | Exterior Trim Material |
| gs_sill_mat | Material | 38 | 3D | Sill Material |
| gs_board_mat | Material | 78 | 3D | Board Material |
| ac_details | Title | --- | - | AC Details |
| ac_left_oversize | Length | 0 | - | Wallhole oversize on the left side for Corner Windows |
| ac_right_oversize | Length | 0 | Parameter | Wallhole oversize on the right side for Corner Windows |
| ac_upper_oversize | Length | 0 | - | "AC Upper Opening Oversize" |
| ac_lower_oversize | Length | 0 | - | "AC Lower Opening Oversize" |
| 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 | 0 | 2D / 3D | "Connection on the Left" |
| gs_stack_right | Boolean | 0 | 2D / 3D | "Connection on the Right" |
| gs_stack_top | Boolean | 0 | 2D / 3D | "Connection on the Top" |
| gs_stack_bottom | Boolean | 0 | 2D / 3D | "Connection on the Bottom" |
| gs_parapet_wall_inset | Boolean | 0 | 2D | Switch on / off parapet wall inset function. |
| gs_parapet_inset_thk | Length | 0.2 | 2D | Inset depth of wall under the board. |
| gs_stWindowSillTrim | String | Parameter | One dimension Array parameter for receiving locale strings |
Geometry parameters of Trims
To clear the meaning of the geometry specific parameters used in WindowSillTrim macro, see the following pictures.
In case of gs_trim_oversize = 0
In case of gs_trim_oversize = 1
Geometry parameters of Sill and Board
Level of Detail in 2D
There are two levels of detail programmed into the macro.
2D Representation
The following pictures explain the meaning of 2D attribute parameters.
Join line representation
Combinig windows to form a large window unit
Windows can be combined to form a large glazed. There are four parameters to contol
the appearance of the Trim, Sill and Board elements on the related sides.
The following pictures show the look and the possibilities.

Stacked window with oversize
A window can aligned to each other with preserving gaps with the window oversize parameters. It can be helpful to preserving space for the joining mullions.
Parapet Wall Inset

3. Usage
Localization
The macro's default language is English. You can localize it with the gs_stWindowSillTrim parameters:
| Row | Default value | Description |
|---|---|---|
| 1 | Off | Value list item - gs_window_trim |
| 2 | Inside | Value list item - gs_window_trim |
| 3 | Outside | Value list item - gs_window_trim |
| 4 | Both Sides | Value list item - gs_window_trim |
| 5 | Off | Value list item - gs_window_sill |
| 6 | Inside | Value list item - gs_window_sill |
| 7 | Outside | Value list item - gs_window_sill |
| 8 | Both Sides | Value list item - gs_window_sill |
| 9 | Timber Sill | Value list item - gs_sill_type |
| 10 | Brick Sill | Value list item - gs_sill_type |
| 11 | Stone Sill | Value list item - gs_sill_type |
| 12 | Off | Value list item - gs_wcont_line |
| 13 | Inside | Value list item - gs_wcont_line |
| 14 | Outside | Value list item - gs_wcont_line |
| 15 | Both Sides | Value list item - gs_wcont_line |
| 16 | Trim Settings | UI String - tabpage name |
| 17 | General Geometry | UI String - static text (title of the left pane) ! not used now |
| 18 | Trim Position | UI String - static text - gs_window_trim |
| 19 | Trim Oversize | UI String - static text - gs_trim_oversize |
| 20 | Inside | UI String - static text |
| 21 | Outside | UI String - static text |
| 22 | Appearance | UI String - static text (title of the right pane) ! not used now |
| 23 | Material Inside | UI String - static text - gs_trim_in_mat |
| 24 | Material Outside | UI String - static text - gs_trim_out_mat |
| 25 | Sill and Board Settings | UI String - static text - gs_window_sill |
| 26 | Sill Position | UI String - static text - gs_window_sill |
| 27 | Sill Oversize | UI String - static text - gs_sill_oversize |
| 28 | Sill Type | UI String - static text - gs_sill_type |
| 29 | Sill | UI String - static text (not used) |
| 30 | Board | UI String - static text (not used) |
| 31 | Sill Material | UI String - static text - gs_sill_mat |
| 32 | Board Material | UI String - static text - gs_board_mat |
| 33 | Attributes - Sill, Board, Trim, Wall | UI String - tabpage name |
| 34 | Overhang Left | UI String - gs_sill_ovhg_left |
| 35 | Overhang Right | UI String - gs_sill_ovhg_right |
| 36 | Slip in Depth | UI String - gs_sill_slip_in |
| 37 | Is Curved in Curved Walls | UI String - gs_sill_curved |
| 38 | Board | UI String - title |
| 39 | Overhang Left | UI String - gs_board_ovhg_left |
| 40 | Overhang Right | UI String - gs_board_ovhg_right |
| 41 | Slip in Depth | UI String - gs_board_slip_in |
| 42 | Is Curved in Curved Walls | UI String - gs_board_curved |
| 43 | Fill | UI String - title |
| 44 | Type | UI String - title |
| 45 | Pen | UI String - title |
| 46 | Backgr. Pen | UI String - title |
| 47 | Plan Symbol | UI String - title |
| 48 | Sill | |
| 49 | Board | |
| 50 | Trim | |
| 51 | Inside | |
| 52 | Outside | |
| 53 | Contour Pen | UI String - gs_trim_pen_cont |
| 54 | Wall | UI String - title |
| 55 | Contour Line | UI String - gs_wcont_line |
| 56 | Cont. L. Type Inside | UI String - gs_wcont_line_in |
| 57 | Cont. L. Type Outside | UI String - gs_wcont_line_out |
| 58 | Casing Out | UI String - General tabpage |
| 59 | Casing In | UI String - General tabpage |
| 60 | Sill Out | UI String - General tabpage |
| 61 | Sill In | UI String - General tabpage |
| 62 | Ganging | UI String - General tabpage |
Master Script
The window object has to define the string tables for the gs_window_trim and gs_window_sill parameters.
dim gs_stWindowSillTrim[] gs_stWindowSillTrim[15] = "" gs_stWindowSillTrim[ 1] = `Off` gs_stWindowSillTrim[ 2] = `Inside` gs_stWindowSillTrim[ 3] = `Outside` gs_stWindowSillTrim[ 4] = `Both Sides` gs_stWindowSillTrim[ 5] = `Off` gs_stWindowSillTrim[ 6] = `Inside` gs_stWindowSillTrim[ 7] = `Outside` gs_stWindowSillTrim[ 8] = `Both Sides` gs_stWindowSillTrim[ 9] = `Timber Sill` gs_stWindowSillTrim[10] = `Brick Sill` gs_stWindowSillTrim[11] = `Stone Sill` gs_stWindowSillTrim[12] = `Off` gs_stWindowSillTrim[13] = `Inside` gs_stWindowSillTrim[14] = `Outside` gs_stWindowSillTrim[15] = `Both Sides`
For calling this macro from the 2D and 3D script, you have to identify the index of the selected items in case of the gs_window_trim and gs_window_sill parameters.
! ============================================================================= ! Array index definitions ! ============================================================================= if gs_window_trim = gs_stWindowSillTrim[1] then iTrim = 1 ! Off if gs_window_trim = gs_stWindowSillTrim[2] then iTrim = 2 ! Inside if gs_window_trim = gs_stWindowSillTrim[3] then iTrim = 3 ! Outside if gs_window_trim = gs_stWindowSillTrim[4] then iTrim = 4 ! Both Sides if gs_window_sill = gs_stWindowSillTrim[5] then iSill = 1 ! Off if gs_window_sill = gs_stWindowSillTrim[6] then iSill = 2 ! Inside if gs_window_sill = gs_stWindowSillTrim[7] then iSill = 3 ! Outside if gs_window_sill = gs_stWindowSillTrim[8] then iSill = 4 ! Both Sides if gs_sill_type = gs_stWindowSillTrim[ 9] then iSillType = 1 ! Timber Sill if gs_sill_type = gs_stWindowSillTrim[10] then iSillType = 2 ! Brick Sill if gs_sill_type = gs_stWindowSillTrim[11] then iSillType = 3 ! Stone Sill
Parameter Script
For implementing the parameter logic of the Trims, Sill and Board, you have to call this macro passing the following parameters.
dim gs_stWindowSillTrim[] gs_stWindowSillTrim[15] = "" gs_stWindowSillTrim[ 1] = `Off` gs_stWindowSillTrim[ 2] = `Inside` gs_stWindowSillTrim[ 3] = `Outside` gs_stWindowSillTrim[ 4] = `Both Sides` gs_stWindowSillTrim[ 5] = `Off` gs_stWindowSillTrim[ 6] = `Inside` gs_stWindowSillTrim[ 7] = `Outside` gs_stWindowSillTrim[ 8] = `Both Sides` gs_stWindowSillTrim[ 9] = `Timber Sill` gs_stWindowSillTrim[10] = `Brick Sill` gs_stWindowSillTrim[11] = `Stone Sill` gs_stWindowSillTrim[12] = `Off` gs_stWindowSillTrim[13] = `Inside` gs_stWindowSillTrim[14] = `Outside` gs_stWindowSillTrim[15] = `Both Sides` ! ===== Do Trim and Sill Parameter Logic ===== call "WindowSillTrim" parameters gs_IsCurved = 0, iWindowShape = 0, ! Rectangular Shape gs_frame_width = gs_frame_width, ! --- Trim --- gs_window_trim = gs_window_trim, gs_trim_oversize = gs_trim_oversize, gs_trim_width = gs_trim_width, gs_trim_width_in = gs_trim_width_in, gs_trim_width_out = gs_trim_width_out, gs_trim_offs = gs_trim_offs, gs_trim_offs_in = gs_trim_offs_in, gs_trim_offs_out = gs_trim_offs_out, gs_trim_thk = gs_trim_thk, gs_trim_thk_in = gs_trim_thk_in, gs_trim_thk_out = gs_trim_thk_out, gs_tw_left_in = gs_tw_left_in, gs_tw_right_in = gs_tw_right_in, gs_tw_left_out = gs_tw_left_out, gs_tw_right_out = gs_tw_right_out, ! --- Sill --- gs_window_sill = gs_window_sill, gs_sill_oversize = gs_sill_oversize, gs_sill_type = gs_sill_type, gs_board_type = gs_board_type, gs_sill_thk = gs_sill_thk, gs_sill_nosing = gs_sill_nosing, gs_sill_angle = gs_sill_angle, gs_sill_ovhg_left = gs_sill_ovhg_left, gs_sill_ovhg_right = gs_sill_ovhg_right, gs_sill_slip_in = gs_sill_slip_in, gs_sill_width = gs_sill_width, gs_sill_frame_nosing = 0.01, gs_sill_frame_keep = 0.01, gs_sill_curved = gs_sill_curved, gs_board_thk = gs_board_thk, gs_board_nosing = gs_board_nosing, gs_board_angle = gs_board_angle, gs_board_ovhg_left = gs_board_ovhg_left, gs_board_ovhg_right = gs_board_ovhg_right, gs_board_slip_in = gs_board_slip_in, gs_board_curved = gs_board_curved, ! --- Corner Window Function --- ac_cw_function = 0, ac_corner_window = 0, ! --- Oversize --- ac_right_oversize = ac_right_oversize, ! --- Stacked Window gs_stack_left = gs_stack_left, gs_stack_right = gs_stack_right, gs_stack_top = gs_stack_top, gs_stack_bottom = gs_stack_bottom, ! --- Parapet Wall Inset gs_parapet_wall_inset = gs_parapet_wall_inset, ! --- String Resource --- gs_stWindowSillTrim = gs_stWindowSillTrim
2D Script
In the 2D script the window has to contain the following code portion.
In addition it has to empty the transformation stack before calling this macro (eg. with a del top command)
dim gs_stWindowSillTrim[] gs_stWindowSillTrim[15] = "" gs_stWindowSillTrim[ 1] = `Off` gs_stWindowSillTrim[ 2] = `Inside` gs_stWindowSillTrim[ 3] = `Outside` gs_stWindowSillTrim[ 4] = `Both Sides` gs_stWindowSillTrim[ 5] = `Off` gs_stWindowSillTrim[ 6] = `Inside` gs_stWindowSillTrim[ 7] = `Outside` gs_stWindowSillTrim[ 8] = `Both Sides` gs_stWindowSillTrim[ 9] = `Timber Sill` gs_stWindowSillTrim[10] = `Brick Sill` gs_stWindowSillTrim[11] = `Stone Sill` gs_stWindowSillTrim[12] = `Off` gs_stWindowSillTrim[13] = `Inside` gs_stWindowSillTrim[14] = `Outside` gs_stWindowSillTrim[15] = `Both Sides` if gs_wcont_line = gs_stWindowSillTrim[12] then iWallContourLine = 1 if gs_wcont_line = gs_stWindowSillTrim[13] then iWallContourLine = 2 if gs_wcont_line = gs_stWindowSillTrim[14] then iWallContourLine = 3 if gs_wcont_line = gs_stWindowSillTrim[15] then iWallContourLine = 4 ! ===== Draw Trim and Sill ===== call "WindowSillTrim" parameters A = A, offsX = offsX, gs_IsCurved = gs_IsCurved, ! --- Reveal Parameters iRevealType = iRevealType, gs_reveal_left_angle = gs_reveal_left_angle, gs_reveal_right_angle = gs_reveal_right_angle, ! --- Corner Window Parameters ac_cw_function = ac_cw_function, ac_corner_window = ac_corner_window, ac_corner_angle = ac_corner_angle, ac_diff_con_wall_thk = ac_diff_con_wall_thk, ac_con_wall_thk = ac_con_wall_thk, ! --- Trim Parameters iTrim = iTrim, gs_trim_oversize = gs_trim_oversize, gs_trim_width = gs_trim_width, gs_trim_width_in = gs_trim_width_in, gs_trim_width_out = gs_trim_width_out, gs_trim_offs = gs_trim_offs, gs_trim_offs_in = gs_trim_offs_in, gs_trim_offs_out = gs_trim_offs_out, gs_trim_thk = gs_trim_thk, gs_trim_thk_in = gs_trim_thk_in, gs_trim_thk_out = gs_trim_thk_out, gs_tw_left_in = gs_tw_left_in, gs_tw_right_in = gs_tw_right_in, gs_tw_left_out = gs_tw_left_out, gs_tw_right_out = gs_tw_right_out, ! --- Sill Parameters iSill = iSill, iSillType = iSillType, gs_sill_thk = gs_sill_thk, gs_sill_nosing = gs_sill_nosing, gs_sill_angle = gs_sill_angle, gs_sill_ovhg_left = gs_sill_ovhg_left, gs_sill_ovhg_right = gs_sill_ovhg_right, gs_sill_curved = gs_sill_curved, gs_board_nosing = gs_board_nosing, gs_board_ovhg_left = gs_board_ovhg_left, gs_board_ovhg_right = gs_board_ovhg_right, gs_board_curved = gs_board_curved, bShowSillSplice = 1, bShowBoardSplice = 0, ! --- Stacked Window gs_stack_left = gs_stack_left, gs_stack_right = gs_stack_right, gs_stack_bottom = gs_stack_bottom, ! --- 2D Representation lod2D = lod2D, gs_pen_2D = gs_pen_2D, gs_trim_pen_cont = gs_trim_pen_cont, gs_wallhole_fill = gs_wallhole_fill, gs_wallhole_pen_fg = gs_wallhole_pen_fg, gs_wallhole_pen_bg = gs_wallhole_pen_bg, iWallContourLine = iWallContourLine, gs_wcont_line_in = gs_wcont_line_in, gs_wcont_line_out = gs_wcont_line_out, gs_trim_pen_fg_in = gs_trim_pen_fg_in, gs_trim_pen_bg_in = gs_trim_pen_bg_in, gs_trim_fill_in = gs_trim_fill_in, gs_trim_pen_fg_out = gs_trim_pen_fg_out, gs_trim_pen_bg_out = gs_trim_pen_bg_out, gs_trim_fill_out = gs_trim_fill_out, ! --- Oversize gs_left_oversize = gs_left_oversize, gs_right_oversize = gs_right_oversize, ! --- Parapet Wall Inset gs_parapet_wall_inset = gs_parapet_wall_inset, gs_parapet_inset_thk = gs_parapet_inset_thk, ! --- Window Nominal Size gs_nominal_size_jamb_inner = gs_nominal_size_jamb_inner, gs_nominal_add_left = gs_nominal_add_left, gs_nominal_add_right = gs_nominal_add_right
3D Script
In this script the window object has to contain the following code section.
It has to empty the transformation stack before calling this macro (eg. with a del top command)
! ===== Draw Trim and Sill ===== call "WindowSillTrim" parameters A = A, B = B, offsX = offsX, offsY = offsY, iWindowShape = iWindowShape, archHeight = windowArchHeight, nArchResolution = 32, gs_IsCurved = 0, ! --- Reveal Parameters iRevealType = iRevealType, gs_reveal_left_angle = gs_reveal_left_angle, gs_reveal_right_angle = gs_reveal_right_angle, ! --- Corner Window Parameters ac_cw_function = ac_cw_function, ac_corner_window = ac_corner_window, ac_corner_angle = ac_corner_angle, ac_diff_con_wall_thk = ac_diff_con_wall_thk, ac_con_wall_thk = ac_con_wall_thk, ! --- Trim Parameters iTrim = iTrim, gs_trim_oversize = gs_trim_oversize, gs_trim_width = gs_trim_width, gs_trim_width_in = gs_trim_width_in, gs_trim_width_out = gs_trim_width_out, gs_trim_offs = gs_trim_offs, gs_trim_offs_in = gs_trim_offs_in, gs_trim_offs_out = gs_trim_offs_out, gs_trim_thk = gs_trim_thk, gs_trim_thk_in = gs_trim_thk_in, gs_trim_thk_out = gs_trim_thk_out, gs_tw_left_in = gs_tw_left_in, gs_tw_right_in = gs_tw_right_in, gs_tw_top_in = gs_tw_top_in, gs_tw_bottom_in = gs_tw_bottom_in, gs_tw_left_out = gs_tw_left_out, gs_tw_right_out = gs_tw_right_out, gs_tw_top_out = gs_tw_top_out, gs_tw_bottom_out = gs_tw_bottom_out, bShowTrimInsideSplice = 0, bShowTrimOutsideSplice = 0, ! --- Sill Parameters iSill = iSill, gs_sill_oversize = gs_sill_oversize, iSillType = iSillType, gs_sill_thk = gs_sill_thk, gs_sill_nosing = gs_sill_nosing, gs_sill_angle = gs_sill_angle, gs_sill_ovhg_left = gs_sill_ovhg_left, gs_sill_ovhg_right = gs_sill_ovhg_right, gs_sill_slip_in = gs_sill_slip_in, gs_sill_width = gs_sill_width, gs_sill_frame_nosing = 0.01, gs_sill_frame_keep = 0.01, gs_sill_curved = gs_sill_curved, gs_board_thk = gs_board_thk, gs_board_nosing = gs_board_nosing, gs_board_angle = gs_board_angle, gs_board_ovhg_left = gs_board_ovhg_left, gs_board_ovhg_right = gs_board_ovhg_right, gs_board_slip_in = gs_board_slip_in, gs_board_curved = gs_board_curved, bShowSillSplice = 1, bShowBoardSplice = 0, ! --- Stacked Window gs_stack_left = gs_stack_left, gs_stack_right = gs_stack_right, gs_stack_top = gs_stack_top, gs_stack_bottom = gs_stack_bottom, ! --- 2D Representation gs_trim_pen_cont = gs_trim_pen_cont, gs_sill_fill = gs_sill_fill, gs_sill_pen_fg = gs_sill_pen_fg, gs_sill_pen_bg = gs_sill_pen_bg, gs_board_fill = gs_board_fill, gs_board_pen_fg = gs_board_pen_fg, gs_board_pen_bg = gs_board_pen_bg, gs_trim_fill_in = gs_trim_fill_in, gs_trim_pen_bg_in = gs_trim_pen_bg_in, gs_trim_pen_fg_in = gs_trim_pen_fg_in, gs_trim_fill_out = gs_trim_fill_out, gs_trim_pen_fg_out = gs_trim_pen_fg_out, gs_trim_pen_bg_out = gs_trim_pen_bg_out, ! --- 3D Representation lod3D = lod3D, gs_frame_pen = gs_frame_pen, ! --- Materials gs_trim_in_mat = gs_trim_in_mat, gs_trim_out_mat = gs_trim_out_mat, gs_sill_mat = gs_sill_mat, gs_board_mat = gs_board_mat, ! --- Oversize gs_left_oversize = gs_left_oversize, gs_right_oversize = gs_right_oversize, gs_upper_oversize = gs_upper_oversize, gs_lower_oversize = gs_lower_oversize, ac_right_oversize = ac_right_oversize, ! --- Window Nominal Size gs_nominal_size_jamb_inner = gs_nominal_size_jamb_inner, gs_nominal_add_left = gs_nominal_add_left, gs_nominal_add_right = gs_nominal_add_right
UI Script
For implementing the user interface page in your object, just call the macro from the UI script.
if gs_wcont_line = gs_stWindowSillTrim[12] then iWallContourLine = 1 if gs_wcont_line = gs_stWindowSillTrim[13] then iWallContourLine = 2 if gs_wcont_line = gs_stWindowSillTrim[14] then iWallContourLine = 3 if gs_wcont_line = gs_stWindowSillTrim[15] then iWallContourLine = 4 trimTabpageIndex = 1 sillTabpageIndex = 2 attributesTabpageIndex = 3 call "WindowSillTrim" parameters iWindowShape = iWindowShape, bOpeningDirection = 0, iTrim = iTrim, iSill = iSill, iSillType = iSillType, iWallContourLine = iWallContourLine, gs_bFills = gs_bFills, idTab_TrimSettings = trimTabpageIndex, idTab_SillSettings = sillTabpageIndex, idTab_Attributes = attributesTabpageIndex, gs_stWindowSillTrim = gs_stWindowSillTrim

