Open core: don’t reinvent the wheel — build your fenestration software on ours.

Skip to main content

To switch a whole group of rules on for one answer or one opening style, put the group in a
Rules Sub-Routine and call it from the series with one Rule Segment rule that carries the test.
The concept is explained in Sub-Routines.

Examples

Picture-window beads for the 3501. To bead the fixed glass, the rule calls sub-routine 3000 PW GB on
the glazing beads, at All Glazing Beads, when the opening style is UD Opening 1 or 53.

Field 3501 (269), rule 206
Level / Position All Glazing Beads / Unit
Rule Type Rule Segment
Value 1 265 “3000 PW GB” (a Rules Sub-Routine)
Test UD Opening in 1, 53

Same idea in the 3500. 3500 (268) rule 253 calls 3500 PW GB (465) the same way. Its older call to 265
is rule 252, now inactive — switching the sub-routine was done by adding a new call and unticking Active
on the old one.

Option sub-routines work the same way with Rule Type OptionSegment: 3501 rule 77 calls 283 “Grid
Options”.

Steps

  1. OJ Setup → Sub-Routines → New → type Rules Sub-Routine → Save. (Or select a similar
    one and copy it.)
  2. Open its Rules tab and add the group’s rules as usual (parts, profiles, station rules).
  3. In the sellable series, Rules tab → New: Rule Type Rule Segment, Value 1 = the
    sub-routine, Level = the piece the group works on (All Frame, All Glazing Beads…).
  4. Tick Has Test and add the answer, for example Shape/M Option = the answer, or UD Opening =
    the opening styles (how to add a test).
  5. Save. The whole group now runs only when that test fits, on the piece the calling rule matched.
  6. Build one item with the answer and one without, and compare the BOMs.

To see what a series calls, filter its Rules list by Type: Rule Segment in the Filters panel.
The AI assistant can also list the whole call tree with the answers each call is used for
(recipe).

Switching a series to a different sub-routine

  1. Select the old Rule Segment rule and click Insert: the copy lands directly below with the same
    Level and tests.
  2. On the copy, change Value 1 to the new sub-routine → Save.
  3. On the old rule, untick Active → Save. Keeping it inactive (as 3500 rule 252) makes it easy to
    switch back.
  4. Build an item and compare the BOM with one built before the change.
Why not a Comment heading?A Comment rule is only a title in
the list; it never runs and cannot switch the rules under it, even with a test. Use a sub-routine call (this page) or
a test on each rule.
Sub-routines are sharedA change inside a sub-routine changes every
series that calls it. 3000 PW GB (265) is called from more than one series. Copy it first if only one series should
change.
Still to be confirmedThe rules inside a sub-routine run on the piece
the calling rule matched, with their own tests checked. Whether their own Level is checked again is not confirmed
yet; until it is, give the rules inside the same Level as the calling rule, as is the usual practice.
Not to be confusedThe 3501 “Glazing Type” rule (269
rule 50) is an Option Choice on option 102, not a call to sub-routine 102. Glazing Type switches rules through
tests (option answers).