JSON format
Your family is saved as a small JSON file. You normally never edit it by hand — the editor writes it — but it is plain, so here is the shape. Field names are camelCase; lengths are in mm and angles in radians.
{
"formatVersion": 2,
"name": "Flush Door",
"category": "OST_Doors",
"template": "metric-door",
"parameters": [
{ "key": "Width", "type": "length" },
{ "key": "Height", "type": "length" },
{ "key": "Thickness", "type": "length" },
{ "key": "Rough Width", "type": "length", "formula": "Width" },
{ "key": "Rough Height", "type": "length", "formula": "Height" },
{ "key": "Half Height", "type": "length", "group": "constraints",
"formula": "Height / 2", "source": "The panel is centred on its height" }
],
"types": [
{ "name": "0800 x 2100mm",
"values": { "Width": 800, "Height": 2100, "Thickness": 45 } },
{ "name": "0900 x 2100mm",
"values": { "Width": 900, "Height": 2100, "Thickness": 45 } }
],
"materials": [
{ "key": "Wood - Walnut", "args": { "color": [120, 81, 45], "transparency": 0 } }
],
"subcategories": [
{ "key": "Panel", "args": { "material": "Wood - Walnut" } }
],
"nodes": [
{ "nodeType": "rectangle", "key": "PanelProfile",
"args": { "width": "Width", "height": "Height", "center": [0, "Half Height"] } },
{ "nodeType": "extrusion", "key": "DoorPanel", "label": "Door Panel",
"args": { "profile": ["PanelProfile"], "endOffset": "Thickness", "isSolid": true },
"properties": { "material": "Wood - Walnut", "subcategory": "Panel" } }
]
}Lanes
The root is a set of lanes — one array per kind of Revit content, plus the family's formatVersion, name, category, template and an optional source:
| Lane | What it holds |
|---|---|
parameters | The inputs that drive geometry — a flat record per parameter, with no value of its own. See Parameters & coordinates. |
types | The named size variants, and the only place parameter values live. Required, at least one. |
materials | Revit materials this family owns — colour and transparency. |
subcategories | Revit subcategories of the family's category (Object Styles), each with an optional default material, line weights, line pattern and line colour. |
nodes | The geometry: shapes, forms, curves, arrays, annotations. See Node reference. |
properties | Optional. How Revit treats the family as a whole — see below. |
Category and template
category is the family's Revit category, written as Revit's own BuiltInCategory name: OST_Windows, OST_Doors, OST_Casework, OST_Furniture, OST_GenericModel, OST_PlumbingFixtures… It is required, and it must be one of the categories Molding has a contract for (the ones the Category list of the New Graph dialog offers); a missing or unknown category is refused (unknownCategory). It is declared, not read off the template: Revit lets a family started from one template be moved to another category (its help on family templates says to choose a template by hosting behaviour and change the category after), and Autodesk's Revit Model Content Style Guide (RMCSG) tells authors to do exactly that, for example a hosted plumbing fixture from the Generic Model face based template.
template is the .rft the family starts from — its file name in lower case with spaces turned into - (Metric Window.rft → metric-window). It decides how the family is hosted (wall, face, level…), and it must be one the category allows: the templates Revit files under that category, plus the ones RMCSG names for it (Generic Model face based for plumbing fixtures and lighting fixtures; face and roof based for mechanical equipment). The Template list of the dialog shows only those; any other template is refused (templateNotAllowed).
Each category also carries a contract taken from RMCSG. A family published to the catalog must meet it; a private family need not (see Validation levels):
| Rule | Windows | Doors |
|---|---|---|
| Sized by the template's | Width, Height — the geometry must use them | Width, Height |
| Formulas | Rough Width from Width, Rough Height from Height | the same |
| Subcategories | the template's (Elevation Swing, Frame/Mullion, Glass, Opening, Plan Swing, Sill/Head, Trim, <Hidden Lines>) plus Hardware and Muntin | the template's (Elevation Swing, Frame/Mullion, Glass, Opening, Panel, Plan Swing, <Hidden Lines>) plus Hardware, Muntin, Trim |
| Type names | XXXX x YYYYmm: width and height in whole millimetres, four digits (0750 x 1000mm) | the same |
Casework is sized by Width, Height and Depth. For a published family, every category limits subcategories to the template's own plus the ones RMCSG approves for it (casework adds Cabinet, Counter Top, Glass, Hardware, Plan Rep Above; furniture adds Seating, Desk, Table), and parameter names to the template's own plus the parameter dictionary.
Validation levels
Molding checks a family at two levels. Both run before anything reaches Revit, and both report findings: each one names where it sits in the JSON (parameters[Glas Width], types[750 x 1000mm], subcategories[Handel], nodes[Frame].path, root.template), a code and a message.
| Level | What it asks | Applies to |
|---|---|---|
| Structural | Does the definition generate the family it declares? | Every family — private, draft or public — on every save, and in the Revit add-in before it builds anything |
| Publish | Does the family also speak the catalog's shared vocabulary? | Families published to the catalog |
Structural
The structural level covers everything described on these pages: unique keys across the lanes, formulas Revit accepts, references that resolve, node arguments the catalog knows, at least one family type with a value for every parameter that needs one, well-formed shared GUIDs, sizes that stay positive in every type, and so on. From the category contract it adds:
| Code | Refused when |
|---|---|
unknownCategory | category is missing or is not a category Molding has a contract for. Every category of a Revit family template or that Revit accepts for a Generic Model family has a contract, but no node builds the content of an annotation family (tag label), a profile loop or truss chords, so those families carry parameters and types only |
templateNotAllowed | template is not one the category allows |
templateParameterOverride | a parameter the template already ships (Width, Height in metric-window) is declared with another type, a group, shared, or a description on a built-in parameter — declare it with its Revit type and nothing else |
invalidKey | a parameter key cannot be read back by a formula as exactly one name: a leading or trailing space, or an operator or bracket character (Frame-Width) |
unknownField | a field the format does not define, at any level: the root, a parameter (and its shared / slider), a type, a material or subcategory (and its args), a node, a node's args or properties, a visibility switch, a family setting |
reservedName | a parameter key starting with _ or ending in _neg: the add-in names its own helper parameters that way |
unknownParameterType | a parameter type that is not one of the parameter types |
invalidFamilyProperty | an omniClass that is not a code of Revit's OmniClass table, or that the table files under another category (a door code on a window); a partType the category does not offer (see Family settings below) |
invalidSubcategoryArg | a subcategory lineWeight / lineWeightCut that is not a whole pen number from 1 to 16, an empty linePattern, or a color that is not three whole numbers from 0 to 255 |
A family whose formatVersion is not the current one gets a single finding and no others, since every other rule is written for the current shape: formatOutdated (missing or older: an editor or a save brings it forward first, see Format version) or formatTooNew (written by a newer Molding than the one checking it).
The other structural codes: duplicateParameterKey, duplicateNodeKey, duplicateKey, unknownParameter, unknownReference, unknownNodeReference, forwardNodeReference, unknownNodeType, missingArgument, circularDependency, invalidFormula, invalidRoot, typeMismatch, noTypes, duplicateTypeName, missingTypeValue, formulaTypeValue, invalidGuid, duplicateGuid, nonParametricCoordinate, unsupportedGeometry, unsupportedTemplate.
Within these rules a private family names its parameters, subcategories and types as it likes.
Publish
The publish level is the structural level plus the category contract's vocabulary:
| Code | Refused when |
|---|---|
unsupportedInCatalog | the family has an image node, whose file stays on your machine |
name_unregistered | a parameter key is neither a template parameter nor a row of the parameter dictionary registered for the category; or a subcategory key is neither the template's own nor approved for the category |
dictionaryMismatch | a dictionary name is declared with another type, type/instance binding, group or shared GUID than its dictionary row |
templateParameterUnused | a driving template parameter of the category (Doors, Windows: Width, Height; Casework: Width, Height, Depth) is not read by any formula or coordinate |
missingContractFormula | a formula parameter of the category (Doors, Windows: Rough Width reading Width, Rough Height reading Height) is missing, or has no formula that reads it |
typeNameMismatch | a type name does not follow the category's pattern (Doors, Windows: {Width} x {Height}mm, whole millimetres padded to four digits, 0900 x 2100mm) |
missingTypeData | a type gives no Description or Assembly Code (and, for Doors and Windows, no Operation); or the family names a manufacturer in some type but does not give Manufacturer, Model and URL in every type |
invalidTypeData | an Assembly Code that is not in Revit's Assembly Code table, or that the table files under another category (a wall code on a window); an Operation that Revit's IFC export does not read for the category (Windows: SINGLE_PANEL, DOUBLE_PANEL_VERTICAL…; Doors: SINGLE_SWING_LEFT…); any value for Cost |
Type data. A catalog family carries, in every type, the identity data Autodesk's Revit Model Content Style Guide lists for its category: a Description, an Assembly Code from Revit's own Assembly Code table, and for doors and windows an Operation. These are the template's own parameters, so each is declared with its Revit type and nothing else, then given a value per type:
"parameters": [
{ "key": "Description", "type": "text" },
{ "key": "Assembly Code", "type": "text" },
{ "key": "Operation", "type": "text" }
],
"types": [
{ "name": "1000 x 1250mm", "values": { "Width": 1000, "Height": 1250,
"Description": "Single-sash tilt-and-turn uPVC window, 4-16-4 double glazing",
"Assembly Code": "B2020100", "Operation": "SINGLE_PANEL" } }
]Operation is compared the way Revit's IFC export compares it, ignoring case, spaces and underscores, so Single Panel is accepted too. It holds the window's panel layout, not how the sash opens: a tilt-and-turn window is still SINGLE_PANEL, and the Description says how it opens. A family modelled after a manufacturer's product gives Manufacturer, Model and URL in every type; a generic family leaves all three empty. Cost stays empty, since prices change. Keynote, thermal values (Heat Transfer Coefficient (U), Solar Heat Gain Coefficient, Visual Light Transmittance…) and Default Sill Height are not required: a keynote depends on the keynote table of the project the family is loaded into, and thermal values belong to a specific product with a stated glazing unit, so a family states them only when a document gives them.
For a misspelt name, name_unregistered suggests what you probably meant: the decided replacement for a known variant (HalfWidth → Half Width), otherwise up to five registered names at most two letters away (Glas Width → Glass Width). typeNameMismatch suggests the name the type's own Width and Height give.
Where each level runs
- Editor. The findings are listed at the top of the editor panel, above the tabs: the structural ones always, the publish ones too while the header's
Publicswitch is on (the heading then reads (public catalog)). Each row shows the JSON path and the message; a publish-only finding is tagged Required to publish; a suggested name appears as a button under Did you mean, which renames the parameter, subcategory or type everywhere it is used. Clicking a row opens the tab that edits it. - Save.
Saverefuses while the list is not empty, and nothing is uploaded. The server applies the same check: a draft or private save must pass the structural level, a public save the publish level; otherwise it answers with the findings and stores nothing. An administrator switching a family to public runs the publish level too. - Revit add-in. Before it builds a family, the add-in runs its own structural check, from the same node catalog and contract data, embedded in the add-in. The publish rules are not the add-in's: a family reaches the Revit catalog only by being published, which has already passed them.
Format version
Every field a family holds is one the format defines; anything else is refused (unknownField), never ignored, so a field added later can never collide with something an older family already carried.
A family outlives the Molding release that wrote it: an add-in installed on your machine reads definitions the chat server writes (and the Molding data stored in your projects), and a .json you exported with Save JSON keeps the shape it was written in. So every family carries formatVersion, a whole number; the current one is 2. Version 2 added optional fields only (the family settings omniClass and partType, a subcategory's line weights, line pattern and line colour, and the heatTransferCoefficient / thermalResistance parameter types), so a version-1 family is brought forward unchanged apart from its number. Any change to the shape bumps it, even an added optional field (an older reader would refuse that field as unknown), and ships a migration step from the previous version.
- Older families are brought forward. Opening a family in the editor or on its family page upgrades it to the current version first, and the server upgrades an older family before it checks and stores it, so a family saved today is always written in the current version. A family without
formatVersionis version 0, the shape before the format was frozen (November 2026). - Newer families are refused, never guessed. A Molding that reads only older versions refuses a newer family (
formatTooNew) instead of dropping what it does not understand. - The Revit add-in says which version it reads. When the chat window opens, the add-in reports the newest format version it reads, and the chat sends it with every message. If it is older than the current one, the server refuses the message (
addinOutdated) and the refusal points to the installer; an add-in from before format versions reports nothing and is treated the same way. A selected family whose stored Molding data is newer than the server reads is refused asfamilyFormatTooNew.
Provenance: source
source holds where the family comes from — the maker documents it was drawn from, what is and is not modelled — and each parameter can carry its own ("Glass edge 118 = 56 + 79 - 17 (VEKA Softline 70 AD data sheet p2)"). It is editor-only, like label: it is saved with the family but never sent to Revit. description, by contrast, becomes the tooltip in Revit's Properties palette, so it is written for the people who place the family and carries no document references.
One key space
Every key — parameter, material, subcategory, node — is unique across all lanes. That is what makes a single reference string unambiguous: a form's material may name a materials-lane key (a fixed material) or a material-type parameter key (the material becomes editable in Revit), and there is never a question which one you meant.
A key is also the Revit name of what it creates: the material key is the material's name in Revit, the subcategory key is the subcategory's name, the parameter key is the parameter's name. label is editor chrome only — a friendlier display name that never reaches Revit's naming.
Keys must be unique, and any parameter key a coordinate references must exist — otherwise generation reports an error.
Parameters are flat; values live on types
A parameter is a flat record that mirrors Revit's own FamilyParameter — key, type, group, instance, an optional formula — and it carries no value. group is one of dimensions, constraints, construction, graphics, materials, identity, text, data, general, structural, electrical, mechanical, plumbing, analysis (see the fields of a parameter). That is Revit's rule, not ours: in Revit a value belongs to a family type, which is why types is required and must hold at least one entry.
{ "key": "Glass Material", "type": "material", "group": "materials" }
{ "key": "Half Height", "type": "length", "group": "constraints", "formula": "Height / 2" }A parameter is driven either by a formula or by the per-type values — never both. Every parameter without a formula gets a value in every type; a formula parameter never appears in values, because Revit computes it.
args vs properties
Nodes have two tiers:
args— what the thing is. A rectangle'swidth/height, an extrusion'sprofile/endOffset. An arg name means one thing in every node kind and is named after the Revit property it sets (startOffset/endOffseton an extrusion,bottomOffset/topOffseton a blend).properties— how Revit shows it.material,subcategory,visible,views,detailLevels— only on the node kinds that take them: the forms that build a solid (openingtakes none),modelText, and themodelCurve/symbolicCurve/detailCurveelements (nomaterialon a curve; noviewson a symbolic or detail curve, which is view-specific already).
Materials and subcategories carry args only — a material's color / transparency, a subcategory's default material and its Object Styles line style — and no properties tier. Parameters have neither: they are flat.
A subcategory's line style, each field optional (absent keeps the template's setting):
| Field | Revit (Object Styles) | Value |
|---|---|---|
lineWeight | Line Weight, Projection | a pen number, a whole number from 1 to 16 |
lineWeightCut | Line Weight, Cut | a pen number, 1 to 16 |
linePattern | Line Pattern | "Solid" or the name of a line pattern the family template holds (Metric Window has Dash and Center, for example). The pattern is reused, never created: a name says nothing about its dashes, so a name the template does not hold stops generation with an error |
color | Line Color | [red, green, blue], each 0 to 255 |
{ "key": "Elevation Swing", "args": { "lineWeight": 1, "lineWeightCut": 1, "linePattern": "Center", "color": [0, 0, 0] } }All four are literals. Revit gives a subcategory no parameters of its own, so none of them can follow a family parameter. In the editor they are the Line weight, Cut weight, Line pattern and Line colour rows of a subcategory card in the Materials tab.
Every bindable property takes a literal or a parameter key, and the runner associates it to that family parameter so Revit's own solver drives it. "visible": "Show Plan Swing" follows a Yes/No parameter; "material": "Frame Material" follows a material parameter. views and detailLevels are the exception: literal true / false only, because Revit offers no parameter for them.
"properties": {
"material": "Frame Material",
"subcategory": "Hardware",
"visible": "Show Plan Swing",
"views": { "planRcp": false },
"detailLevels": { "coarse": false, "medium": true, "fine": true }
}Family settings — the root's properties
The root carries the same properties tier, one level up: there is nothing to define at the root (the lanes do that), so only the "how Revit treats it" half exists. These are the switches in Revit's Family Category and Parameters dialog, and you edit them in the editor's Types tab under the FAMILY heading.
"properties": {
"workPlaneBased": true,
"alwaysVertical": false,
"cutWithVoidsWhenLoaded": true,
"shared": false,
"roomCalculationPoint": true
}| Field | Revit |
|---|---|
workPlaneBased | Work Plane-Based |
alwaysVertical | Always Vertical |
cutWithVoidsWhenLoaded | Cut with Voids When Loaded |
shared | Shared |
roomCalculationPoint | Room Calculation Point |
Each one is a literal true or false — unlike a node property, it takes no parameter key, because Revit offers no family-parameter association for these switches. A field you leave out keeps whatever the .rft template already had, which is what the editor's Template option means. A switch the template's category does not offer is a hard error at generation time, not a silent no-op.
Two more settings of the same dialog take a literal string:
| Field | Revit | Value |
|---|---|---|
omniClass | OmniClass Number (Classification Number from Revit 2026) | a code of the OmniClass table Revit installs (OmniClassTaxonomy.txt), filed under the family's category when the table files any code under it: a window takes 23.30.20.14.17 (Plastic Windows), not 23.30.10.00 (Doors). The add-in also fills OmniClass Title from the table. |
partType | Part Type | only on the categories Revit gives a Part Type, with the values Revit offers for each (Revit help, Part Types): Data Devices, Fire Alarm Devices, Lighting Fixtures, Telephone Devices Normal, JunctionBox; Electrical Fixtures also Switch; Plumbing Fixtures Normal; Mechanical Equipment Normal, BreaksInto, ValveBreaksInto, EndCap, InlineSensor; Electrical Equipment PanelBoard, SwitchBoard, Transformer, EquipmentSwitch, OtherPanel; Duct Fittings Elbow, Tee, Cross, Transition, Union, Cap, Offset, MultiPort, Pants, Wye, LateralTee, LateralCross, TapAdjustable, TapPerpendicular. Doors, windows, casework, furniture and generic models have none. |
"properties": { "omniClass": "23.30.20.14.17" }In the editor they are the OmniClass Number and Part Type rows under FAMILY in the Types tab: OmniClass Number lists the codes the table files under the family's category, and Part Type shows only on a category that has one. Both refuse what Revit would not take (invalidFamilyProperty).
Coordinate encoding
A numeric coordinate is a bare number ("endOffset": 45), while a quoted string is a parameter reference ("endOffset": "Thickness"). Writing "45" looks for a parameter named 45.
{ "width": 900 } // hardcoded 900 mm
{ "width": "Width" } // parameter reference
{ "width": "-Half Width" } // negated parameter
{ "center": [0, "Half Height"] } // 2D point: [x, y]Sketch plane and offsets
A 2D point [U, V] lies in the family's sketch plane, and an offset (an extrusion's startOffset / endOffset, a blend's bottomOffset / topOffset) runs along that plane's normal. The plane depends on the category:
| Category | Sketch plane | U | V | Offsets run along |
|---|---|---|---|---|
Doors, Windows (OST_Doors, OST_Windows) | the wall plane | X, along the wall | Z, up | −Y: a positive offset goes to the interior side. In every wall-based metric template the host wall's exterior is +Y, so an exterior part (an outer glass pane) takes a negative offset. |
| every other category | the reference level | X | Y | +Z, up |
A sweep's and a swept blend's profile is the exception: it is always drawn in the XY plane and placed on its path.
Formulas as Revit stores them
A formula reaches Revit exactly as written, but Revit gives it back in its own spelling: a bare number in a length formula gets the document's length unit. Width - 56 is stored as Width - 56 mm, and (Width - 112) * sqrt(0.5) + 45.5 as (Width - 112 mm) * sqrt(0.5) + 45.5 mm. The value is the same, because every template Molding allows comes from Revit's metric family template library, so a bare number in a length formula already means millimetres. Revit's Family Types dialog shows the spelled-out form; the Molding JSON keeps what you wrote.