Wallhole Cut Macro
1. General Description
A window or door can use this macro to cut a wallhole in 3D. The macro can manage the different kinds of walls, e.g. staright, trapezoid and curved walls.
2. Parameters
This macro has similar input parameters as a normal ArchiCAD window:
| Name | Type | Default | Remarks |
|---|---|---|---|
| A | Length | 1 | X Dimension |
| B | Length | 1 | Y Dimension |
| ZZYZX | Length | 1 | Not used |
| AC_Hole_Hotspot_Control | Integer | 3 | Not used |
| AC_show2DHotspotsIn3D | Boolean | 0 | Not used |
| gs_macro_version | Integer | 9 | Macro Version |
| AC_HoleSideMaterial | Boolean | 1 | Hole Side Material |
| AC_HoleMaterialCurved | Boolean | 0 | Hole Material's Split is Curved |
| offsX | Length | 0 | Horizontal Offset Size |
| offsY | Length | 0 | Vertical Offset Size |
| isWindow | Boolean | 1 | Shutter Applied for a Window |
| gs_IsCurved | Boolean | 0 | Curved Window |
| bOpeningDirection | Boolean | 0 | Opening Direction |
| iWindowShape | Integer | 0 | Shape of the window.
|
| archHeight | Length | 0.25 |
Height of the Arc. Only effective when iWindowShape = 1 |
| nArchResolution | Integer | 3 |
Arc resolution for arched windows. if nArchResolution < 3, WALL_RESOL used instead. |
| iRevealType | Integer | 1 | Reveal Type |
| gs_reveal_left_angle | Angle | 20 | Left Side Angle |
| gs_reveal_right_angle | Angle | 20 | Right Side Angle |
| gs_reveal_top_angle | Angle | 20 | Upper Side Angle |
| gs_reveal_bottom_angle | Angle | 20 | Bottom Side Angle |
| ac_corner_window | Boolean | 1 | Corner Window Function |
| ac_cw_function | Boolean | 0 | Placement Type (1=CW,0=W) |
| ac_corner_angle | Angle | 90 | Corner Angle |
| ac_diff_con_wall_thk | Boolean | 0 | Diff. Con. Wall Thickness |
| ac_con_wall_thk | Length | 0 | Conecting Wall Thickness |
| gs_window_trim | String | "Off" | Trim/Casing |
| iTrim | Integer | 4 | Identifies the Trims to be drawn on the window sides |
| gs_trim_oversize | Boolean | 0 | Trim Oversize |
| gs_trim_width | Length | 0 | Trim Width |
| gs_trim_width_in | Length | 0.025 | Trim Width Inside |
| gs_trim_width_out | Length | 0.015 | Trim Width Outside |
| gs_window_sill | String | "Off" | Sill |
| iSill | Integer | 1 | Identifies the Sill and Board to be drawn on the window sides |
| gs_sill_oversize | Boolean | 0 | Sill Oversize |
| gs_sill_type | String | "" | Type of the Sill |
| iSillType | Integer | 1 | Identifies the type of Sill |
| gs_board_type | String | "" | Type of the Board |
| iBoardType | Integer | 1 | Type of the Board |
| gs_sill_thk | Length | 0.025 | Sill Thickness |
| gs_sill_nosing | Length | 0.03 | Sill Nosing |
| gs_sill_angle | Angle | 3 | Sill Angle |
| gs_sill_slip_in | Length | 0 | Sill Slip-in Depth |
| gs_sill_width | Length | 0 | Width of Sill |
| gs_board_thk | Length | 0.025 | Board Thickness |
| gs_board_slip_in | Length | 0 | Board Slip In Depth |
| AC_custom_reveal | Boolean | 0 | Custom Reveal |
| gs_reveal_type | String | "" | Reveal Type |
| gs_windw_stack | Title | --- | Stacked Window |
| gs_stack_left | Boolean | 0 | Connection on the Left |
| gs_stack_right | Boolean | 0 | Connection on the Right |
| gs_stack_top | Boolean | 0 | Connection on the Top |
| gs_stack_bottom | Boolean | 0 | Connection on the Bottom |
| gs_window_oversize | Title | --- | Oversize |
| gs_left_oversize | Length | 0 | Left Opening Oversize |
| gs_right_oversize | Length | 0 | Right Opening Oversize |
| gs_upper_oversize | Length | 0 | Upper Opening Oversize |
| gs_lower_oversize | Length | 0 | Lower Opening Oversize |
| gs_parapet_wall_inset | Boolean | 0 | Parapet Wall Inset |
| gs_parapet_inset_thk | Length | 0.2 | Depth of Inset |
| gs_window_nominal_size | Title | --- | Window Nominal Size |
| gs_nominal_size_jamb_inner | Boolean | 0 | Nominal Size = Jamb Inner Size |
| gs_nominal_add_left | Length | 0 | |
| gs_nominal_add_right | Length | 0 | |
| gs_stWallholeCut | String | String Resource | |
| idTab_CustomRevealSettings | Integer | 0 | Tabpage ID |
3. Usage
Localization
The macro's default language is English, but you can localize it with the gs_stWallholeCut parameter:
| Row | Default value | Description |
|---|---|---|
| 1 | Negative Reveal | Value list item - gs_reveal_type |
| 2 | Slanted Reveal | Value list item - gs_reveal_type |
| 3 | Custom Reveal | UI String - static text - Custom Reveal tabpage |
| 4 | Custom Reveal Sizes | UI String - static text - Custom Reveal tabpage |
| 5 | Parapet Wall Inset | UI String - gs_parapet_wall_inset |
| 6 | Depth | UI String - gs_parapet_inset_thk |
| 7 | Custom Reveal | UI String - General tabpage (windows) |
| 8 | Reveal Type | UI String - General tabpage (windows) |
Master Script
The window has to define the string table for the gs_reveal_type parameter.
dim gs_stWallholeCut[] gs_stWallholeCut[2] = "" gs_stWallholeCut[1] = `Negative Reveal` gs_stWallholeCut[2] = `Slanted Reveal`
For calling this macro from the UI and 3D script, you have to identify the indexes of the selected items for the gs_reveal_type parameter.
! ============================================================================= ! Array index definitions ! ============================================================================= if gs_reveal_type = gs_stWallholeCut[1] then ! Negative Reveal iRevealType = 2 endif if gs_reveal_type = gs_stWallholeCut[2] then ! Slanted Reveal iRevealType = 3 endif
Parameter Script
For implementing the parameter logic of the Custom Reveal, you can call this macro passing the following parameters.
! ============================================================================= ! Do Wallhole Cut Parameter Logic ! ============================================================================= call "WallholeCut" parameters gs_macro_version = 10, gs_parapet_wall_inset = gs_parapet_wall_inset
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)
! ============================================================================= ! Cut the Wallhole ! ============================================================================= call "WallholeCut" parameters A = A, B = B, gs_macro_version = 10, AC_Hole_Hotspot_Control = AC_Hole_Hotspot_Control, AC_HoleSideMaterial = AC_HoleSideMaterial, AC_HoleMaterialCurved = AC_HoleMaterialCurved, isWindow = 1, gs_IsCurved = gs_IsCurved, bOpeningDirection = bOpeningDirection, iWindowShape = iWindowShape, archHeight = openingArchHeight, nArchResolution = nArchResolution, ! --- Reveal Parameters iRevealType = iRevealType, gs_reveal_left_angle = gs_reveal_left_angle, gs_reveal_right_angle = gs_reveal_right_angle, gs_reveal_top_angle = gs_reveal_top_angle, gs_reveal_bottom_angle = gs_reveal_bottom_angle, ! --- Corner Window Parameters ac_corner_window = ac_corner_window, ac_cw_function = ac_cw_function, 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, ! --- Sill Parameters iSill = iSill, gs_sill_oversize = gs_sill_oversize, iSillType = iSillType, iBoardType = iBoardType, gs_sill_thk = gs_sill_thk, gs_sill_nosing = gs_sill_nosing, gs_sill_angle = gs_sill_angle, gs_sill_slip_in = gs_sill_slip_in, gs_sill_width = gs_sill_width, gs_board_thk = gs_board_thk, gs_board_slip_in = gs_board_slip_in, ! --- 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, ! --- 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, ! --- 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 = WIDO_LEFT_JAMB, gs_nominal_add_right = WIDO_RIGHT_JAMB
UI Script
For implementing the user interface page in your object, just call the macro from the UI script.
gs_stWallholeCut[3] = `Custom Reveal` gs_stWallholeCut[4] = `Custom Reveal Sizes` gs_stWallholeCut[5] = `Parapet Wall Inset` gs_stWallholeCut[6] = `Depth` gs_stWallholeCut[7] = `Custom Reveal` gs_stWallholeCut[8] = `Reveal Type` customRevealSettingsTabpageIndex = 1 ! ============================================================================= ! Custom Reveal Settings Tabpage ! ============================================================================= call "WallholeCut" parameters isWindow = 1, gs_macro_version = 10, iWindowShape = iWindowShape, iRevealType = iRevealType, gs_parapet_wall_inset = gs_parapet_wall_inset, gs_stWallholeCut = gs_stWallholeCut, idTab_CustomRevealSettings = customRevealSettingsTabpageIndex

