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

Skip to main content

A “frame type” is not a setting on the series. It is a group of frame rules,
usually in its own Rules Sub-Routine, called from the series by a Rule Segment rule whose test picks it by
the answers on the item. Adding a frame type means: the parts, an answer to choose it, a sub-routine with its
profile rules, and a tested call. Background: sub-routines,
profile rules.

How series 7100 does it

7100 (series 230) has four frame types, chosen by APPLICATION (New construction / Renovation) and INSULATION FOAM
(Not Required / Required):

7100 rule Calls sub-routine When
1196 224 “7M-New Con” New construction, no foam
1197 225 “7M-F New Con” New construction, foam
1198 231 “7M1 Reno” Renovation, no foam
1199 232 “7M1-F Reno” Renovation, foam

All four are Rule Segment rules at Level Frame. Inside 224, Profile Matrix rules put the frame
profile on each side, for example rules 61–64 use matrix 1 “7130 New Construction” and rules
55–58 matrix 2 “7111 Renovation”, mitred and welded. The 3501 works the same way: 3501 rule 188 calls
3501.FRAME (357).

Steps

  1. Parts: create the new frame profile(s) in OJ Setup → Parts, with dimensions, and the colour versions
    if it comes in colours.
  2. If the profile depends on colour, build a Profile Matrix with the part ids in the cells
    (how).
  3. Answer: add the answer the salesperson picks (a new answer on APPLICATION, or a new “Frame
    Type” option) in Options & choices. A new option must also be asked by an
    Option Choice rule in the series (how).
  4. Sub-routine: easiest is to copy a similar frame sub-routine (OJ Setup → Sub-Routines → select
    e.g. 224 → copy), then change the profile rules in the copy: Value 1 part or matrix, end cuts, welds, Width /
    Height Adjust, and the frame hardware and labour.
  5. Call it: in the sellable series add a Rule Segment rule at Level Frame, Value 1 = the new
    sub-routine, Has Test = the new answer.
  6. Fix the other calls: make sure the existing frame calls do not also fire for the new answer. Each
    test lists its answers one by one.
  7. Everything else that tests the frame answer: accessories (7100: sub-routines 315 and 316), labour,
    fabrication (367, called at sash level with APPLICATION tests), mullion T-bars (369). A new answer is in none of their
    tests until you add it.
  8. Build one test item per frame type and check the BOM (how).
Watch outA missed test gives two frames on the BOM, or none.
A Comment heading such as “Renovation” switches nothing. Frame rules often test a list of opening
styles (UD Opening, e.g. 357 rule 55) — see new opening style. Station
rules in the copied sub-routine route the parts after them; check them in the copy.
For the AI assistant: rules to check

Use read_data on the company database, read-only. Replace :series with the id of the series the user names (find it with SELECT id, description FROM series WHERE description LIKE '%7100%'). One statement only, starting with SELECT or WITH, no semicolon, at most 200 rows. The guard rejects these words anywhere, even inside quoted text or aliases: INSERT, UPDATE, DELETE, REPLACE, MERGE, UPSERT, CALL, DO, SET, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE, RENAME, LOCK, UNLOCK, HANDLER, LOAD, EXECUTE, EXEC — so run the recipes as written, with no extra labels. A product is the series plus every sub-routine it calls; the recipes walk that tree. They return numbers, because the company database has no rule-type name tables: translate them with the list below, and answer in shop words.

R1 — the call tree (which frame sub-routines exist and for which answers):

WITH RECURSIVE tree(sid) AS (
SELECT :series
UNION
SELECT r.rulevalue FROM tree t
JOIN rules r ON r.series_id = t.sid AND r.ruletype IN (3, 9) AND r.active = 1
)
SELECT c.series_id AS caller, c.id AS rule_no, c.ruletype, c.level, c.rulevalue AS sub_series,
s.description AS sub_name, s.isseg,
(SELECT GROUP_CONCAT(CONCAT(IF(t.isnot = 1, 'NOT ', ''), 'test', t.type, ' opt', t.value1, ' in (',
IFNULL((SELECT GROUP_CONCAT(v.value) FROM rule_test_value v
WHERE v.seriesid = t.seriesid AND v.ruleno = t.ruleno AND v.testid = t.testid), ''), ')')
SEPARATOR ' AND ')
FROM rule_test t WHERE t.seriesid = c.series_id AND t.ruleno = c.id AND c.test = 1) AS conditions
FROM tree
JOIN rules c ON c.series_id = tree.sid AND c.ruletype IN (3, 9) AND c.active = 1
LEFT JOIN series s ON s.id = c.rulevalue
ORDER BY c.series_id, c.id
LIMIT 200

R2 — profile rules at one level; use :level = 3 for the frame. part_type = 2
keeps profiles only; drop that line to include hardware. On 7100 it returns about 105 rows (mostly accessories 315/316):

WITH RECURSIVE tree(sid) AS (
SELECT :series
UNION
SELECT r.rulevalue FROM tree t
JOIN rules r ON r.series_id = t.sid AND r.ruletype = 9 AND r.active = 1
)
SELECT r.series_id, s.description AS in_series, r.id AS rule_no, r.ruletype, r.level, r.position,
r.rulevalue AS part_or_matrix, COALESCE(p.stockcode, m.description) AS what,
r.leftside AS cut_lt, r.rightside AS cut_rb, r.weldedl, r.weldedr,
r.sizeadjustwtype AS w_type, r.sizeadjustw AS w_mm100, r.sizeadjustwi AS w_64ths,
r.sizeadjusthtype AS h_type, r.sizeadjusth AS h_mm100, r.sizeadjusthi AS h_64ths,
r.test, LEFT(r.description, 40) AS description
FROM tree
JOIN rules r ON r.series_id = tree.sid
JOIN series s ON s.id = r.series_id
LEFT JOIN parts p ON p.id = r.rulevalue AND r.ruletype = 6
LEFT JOIN matrix_header m ON m.id = r.rulevalue AND r.ruletype IN (7, 8)
WHERE r.active = 1 AND r.level = :level AND r.ruletype IN (6, 7, 8)
AND (r.ruletype <> 6 OR p.part_type = 2)
ORDER BY r.series_id, r.id
LIMIT 200

Numbers to names. Rule type: 1 Option Choice, 2 Option Auto, 3 Option sub-routine, 4 Clearance, 5 Clearance Matrix, 6 Part, 7 Part Matrix, 8 Profile Matrix, 9 Rule sub-routine (Rule Segment), 10 Comment, 14 production line, 15 station, 19 Warning, 20 Error, 21 glass supplier, 24 SU gas, 25 SU spacer, 43/44 SU thickness, 90 assembly, 92 parent assembly. Level: 1 Overall, 2 Facet, 3 Frame, 4 Sash Type, 5 Sash, 6 Glass, 7 Glazing Bead, 8 DLO, 29 Grids, 31 Coupler, 32 Mullion, 40 Opening. Position: 1 Top, 2 Bottom, 3 Left, 4 Right, 5 Top+Bottom, 6 Left+Right, 7 All Sides, 11 WxH/Area, 13 Perimeter, 26 Unit. End cut: 1 Mitered, 2 Straight, 3 Machined. Test type: 8 Global Option, 9 Shape/M Option, 10 UD Opening (Open/Shape id), 11 Open Class (1 Picture, 2 LH, 3 RH, 4 Top hinged, 5 Fixed sash), 15 SU Type, 17 SU Thick. Sizes: metric columns are mm×100, imperial columns (ending in i or _imp) are 64ths of an inch; an imperial company (series_uom 2) uses the imperial ones.