docs / Families and Templates

Families and Templates

A model document is one of three classes, and its file extension says which:

ExtensionClassInserted into an assembly
.nbrepPart — every ordinary model, including imported parts and the parts a family or a template makes.Placed as it is.
.fbrepFamily — a parametric model plus a table of every size or configuration it comes in.Never placed itself: you pick one of its members, and that member is placed.
.tbrepTemplate — a parametric model whose marked expressions you set each time you use it.Never placed itself: you name a new part and set the inputs, and that new part is placed.

Extensions are matched in any case and written lowercase. The class is also stored inside the document, so a family you have not saved yet is already a family.

Choosing the class

Families (.fbrep)

A family holds a table, one row per member:

You edit the table while the family is open, in the family table editor. The eye on a row previews that member on the model without changing the family.

Generate

Generate writes every row as <part number>.nbrep in the family file's own folder. Each member is an ordinary part: the family's model with the row's values in its expressions, and the row's part number and description in its part attributes. A family must be saved before it can generate, because the members are written next to its file.

Placing a member

Add component in an assembly lists families beside parts. Choosing a family opens the member picker: one button per row. A row that has never been generated is greyed out and says so. Pick a member and its .nbrep is placed as an ordinary component.

The member picker for a family with a row that has not been generated

Editing a member by hand

A member belongs to its family, so the app does not let you change it silently. The moment you change an open member, a prompt asks where the change should go:

The prompt shown when a family member is changed

Save on a member shows the same prompt rather than writing the file. An assembly's BOM edits to a part's attributes, which normally write back to the part's file, leave a member's file alone and say so in a notice. The assembly keeps the edit.

Templates (.tbrep)

A template is a model whose sizes come from expressions, for example a bracket with height and thick. While a template is open, the Expressions pane shows a Template inputs list with one row per expression. Tick the ones a user sets when they use the template. Each ticked input can have:

Template inputs in the Expressions pane

Using a template

Choosing a template in Add component opens a prompt for the new part's name and each input, filled in with the template's own values. A value outside the limits is named in orange, and Create and insert stays disabled until every value is acceptable. A value may be an expression that uses the template's other expressions, for example width / 2.

The template prompt with a new name and two inputs set

Create and insert writes the new part as <name>.nbrep in the assembly's folder and places it. If the assembly has not been saved yet, the part goes to the models folder and the status line says so. A name that already exists is refused, never overwritten.

The new part is an ordinary part. It keeps its expressions, with your values in place of the template's, so you can keep adjusting it. It records which template it came from (the template's file name and a fingerprint of its contents) for reference only. Changing the template later never changes parts already made from it.