OceanBIM Docs
Upload settings and rules

Naming pattern

Require every family name to be built from the same parts, in the same order, with values you choose.

Work in progress

This page is a draft. Some sections are placeholders and details may change.

A naming pattern says that a family name is not free text but a sequence of parts. For example, an office might require Category, then Type, then Size, giving names such as Door_Single_900.

It is the second block on Settings, Family, Naming convention, below the filename rules.

The Naming pattern block showing a pattern built from three name parts

The ideas

WordMeaning
Name partOne segment of the name, such as Category or Size.
SeparatorThe character that comes after a part, such as an underscore.
Match rulesThe conditions a part's text must satisfy, such as "equals Door".
PatternAll the parts in order.
ConventionA whole pattern saved so you can reuse it. See Naming conventions.

With no parts, the banner shows a star and any name is accepted. Once you add parts, the banner reads Uploaded families must follow this naming pattern and shows the formula, for example Category_Type_Size.rfa.

How a name is checked

The check cuts the file name into pieces, one for each part, and tests each piece against its part. It reads from left to right:

  1. Take the text up to the first separator. That is the first part's piece.
  2. Test it against that part's match rules.
  3. Move on to the next part, starting after the separator.
  4. The last part takes everything that is left, so its own separator is never looked for. The .rfa extension is ignored throughout.

Take a pattern with three parts:

PartSeparatorMatch rules
Category_equals Door, or equals Window
Type_any value
Sizenoneany value, value type Dimension
File nameResultWhy
Door_Single_900.rfaAccepted"Door" is one of the allowed categories, "Single" is not empty, "900" is a size.
Wall_Single_900.rfaRejected"Wall" is neither Door nor Window, so Category fails.
Door-Single-900.rfaRejectedThere is no underscore, so the check reports that the name is missing the separator for Category.
Door_Single_Large.rfaRejected"Large" is not a size, so Size fails.

When a name is rejected, Check before upload shows Naming rule with Blocks upload, and states the pattern the name has to match, written with your part labels, for example {Category}_{Type}_{Size}. It does not say which part failed, so read the name against that formula. Clear part labels make that easy.

Adding a part

Choose Add name part (or Edit on an existing part, shown when you point at it). The window explains itself: Define a segment of the family name and optional match rules.

The name part window for the Category part, with Part label, Trailing separator, Value type and Match rules

Part label

The name of the segment, such as Category, Type or Size. It is what error messages and the formula banner show.

Trailing separator

The character placed after this part. Choose from:

ChoiceCharacter
Nonenothing
Underscore_
Dash-
Dot.
Spacea space
Pipe|
Colon:
Semicolon;

A separator your filename rules do not allow is greyed out in this list: with "Spaces and punctuation" the pipe, colon and semicolon are unavailable, and with "Letters, numbers and underscores" only None and Underscore can be chosen.

The last part's separator is never used. If a part has no separator and its rules list fixed values (for example DR and WIN), the check finds the part by looking for one of those values at that position, trying the longest value first.

Match rules

Rules are a list. Each row has a Logic, a Condition and a Value.

Condition is the test:

ConditionThe text passes when it...
hasValueis not empty
equalsis exactly the value
notEqualsis anything but the value
startsWithbegins with the value
endsWithends with the value
containsincludes the value
notContainsdoes not include the value
minLengthhas at least that many characters (the value is a number)
maxLengthhas at most that many characters (the value is a number)
inListis one of a comma-separated list, such as Door, Window, Wall
notInListis not in that list

The conditions appear in the dropdown spelled exactly as above.

The naming pattern is case-sensitive

equals Door accepts Door but not door or DOOR. This is different from the Categories file rule, which ignores case.

Logic joins a row to the rows before it:

LogicMeaning
ORpasses if this row or the result so far passes
ANDpasses only if this row and the result so far pass
NOTthe result so far, but only when this row fails
ANYno restriction: any non-empty text passes. Used alone.

Rows are combined from top to bottom with no grouping. A part with no rules at all behaves as ANY: it accepts any text that is not empty. To allow a short list of values, use several OR equals rows or a single inList row.

Value, Code and Meaning. Each row also has these text fields:

FieldUsed for
ValueThe text compared with the name, and the text an AI name suggestion will put into the name.
CodeA short code for this value. When a name is suggested from your pattern, the codes of the values used are joined into the family's name code. It is never used to accept or reject a name.
MeaningAn optional note that helps AI name suggestions pick the right value (for example ABC means Tables and work surfaces). It never changes whether a name passes, and it is never written into a name.

The editor also offers Input in spreadsheet for typing many values at once, Select from preset to fill a part from a saved or built-in source, and Clear all to empty the rules.

Value type

The Value type tells the AI name suggestions what kind of text this part holds. It starts as Auto-detect. The choices are: Fixed code, Location, Element type, Variant, Dimension, Measure, Maker, Product, Mark, Material, System, Sequence and Free text.

For three of them it also checks the name, and only for a part that has no fixed rules:

Value typeThe text must...
Dimensionlook like a size: 900, 600x1200, 600mm or a Revit length such as 1'-6"
Measurecontain at least one digit
Sequencecontain at least one digit

All the other types accept any non-empty text, because a file name alone cannot tell a material from a manufacturer.

Arranging and editing

On the pattern, you can:

  • drag a part to reorder it;
  • click a part to edit it, or use its delete control;
  • add a short description to a part with ANY rules. It is a hint for AI suggestions only and is never used to check a name;
  • Apply convention (wand icon) to replace the whole pattern with a saved or built-in convention;
  • Save as convention (bookmark icon) to keep the current pattern for reuse;
  • Clear all name parts to start again.

A pattern can have up to 32 parts, each with up to 300 values of up to 256 characters.

Remember to choose Save changes at the bottom of the page.

Designing a good pattern

  • Start with the parts people already use informally, in the order they say them.
  • Use fixed values (equals or inList) for parts where mistakes are costly, such as Category or Discipline, and ANY for free descriptions.
  • Keep each part's separator the same, unless the name needs to read naturally.
  • Add a Code to each fixed value if you plan to use the name code.
  • After saving, run Verify file rules to see how many existing families already follow the pattern.

In the editor each rule row starts with its logic word, including the first row (for example OR equals Window), as in the screenshot above.