How Can We Help?
A profile reaches the BOM through a Part rule (the part is in the rule’s Value 1) or a
Profile Matrix / Part Matrix rule (the part is in a matrix cell). The same profile is often used in
several sub-routines and several series: bead 1542 (19663000-WH) is in 3000 PW GB (265) rules 49, 50, 75, 76, in
3500 PW GB (465) rules 48, 49, 74, 75, and in matrix 50. So first find every place it is used.
Which change do you need?
| Task | What to change |
|---|---|
| Replace a profile everywhere | Every rule’s Value 1 and every matrix cell that holds it (list them first). Changing the part record itself (dimensions, cost) changes it everywhere at once. |
| Replace it in one series or for one colour | Only that rule, or only that matrix cell. If the matrix is shared with other series, make a copy of the matrix and point this series’ rule at it. |
| Add a profile to one member | A new rule: Level of the member, Position, Part or Profile Matrix, end cuts, welds, Width/Height Adjust in both units, Affects Design on, tests if conditional (how). Put it in the right sub-routine and under the right station rule. |
| Change only its cut length | Width Adjust (top/bottom pieces) or Height Adjust (side pieces) on that rule; fill both M (mm×100) and I (64ths). |
Steps
- List where the profile is used (assistant recipe R5 below, or look through the series and its sub-routines).
- For each place: open the rule → change Value 1 or the adjustments → Save; or open the
matrix (OJ Setup → Matrix) → change the cell’s part id → Save. - Build an item for each series and colour affected; check part, cut length and end cuts in the BOM.
every series. Painted profiles use wildcard stock codes (
*, @) that a Set Wild rulefills in by colour (3501 rules 144/145); a new painted profile needs the wildcard form and an existing Set Wild for
that colour option. Mirrored, Reversed, Feed and the L/T and R/B adjustments cannot be set in the new Rules tab;
changing Value 1 on an existing rule keeps them.
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.
R5 — where part :part is used (in rules and in Part/Profile matrices); replace :part with the
part id. Tested: part 1800 → matrix 97 “9411 IN Main Frame”; part 1542 → 265 rules 49/50/75/76,
465 rules 48/49/74/75 and matrix 50. Matrix cells are text such as 1800.0:
SELECT 'rule' AS used_in, r.series_id, s.description AS series_name, s.isseg, r.id AS rule_no, r.level, r.position,
r.active, NULL AS matrix_id, LEFT(r.description, 40) AS description
FROM rules r JOIN series s ON s.id = r.series_id
WHERE r.ruletype = 6 AND r.rulevalue = :part
UNION ALL
SELECT 'matrix cell', h.series_id, h.description, NULL, NULL, NULL, NULL, NULL, h.id, CONCAT('row ', m.rowL, ' col ', m.colL)
FROM matrix m JOIN matrix_header h ON h.id = m.id
WHERE h.matrix_type_id IN (15, 16) AND h.deleted = 0 AND m.cell_type = 1
AND m.price REGEXP '^[0-9]+(\\.0+)?$' AND CAST(m.price AS DECIMAL(12,2)) = :part
LIMIT 200
Who uses a matrix (replace :matrix):
SELECT series_id, id, level, position FROM rules WHERE ruletype IN (7, 8) AND rulevalue = :matrix AND active = 1
R2 — the profile rules of one member (:level 3 frame, 5 sash, 7 beads); on 3501 level 7 it
shows 212 ODL GB rules 19–22 and 265 rule 38 (Profile Matrix 51, +100 / +4):
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.