In BIMcollab, documents are assigned a code. The structure of such a code can be defined by means of a 'Document Naming Convention'. However, this standardized method may not be able to compose the desired code structure. In these cases, 'Regular Expressions', or RegEx for short, can be used.
Regular Expressions
A 'Regular Expression' is a way of describing patterns that enable computer software to recognize text (source: Wikipedia). Since there is a formal syntax for this and regular expressions can be seen as a kind of programming language, the context of this article is not the place to explain this in more detail. If you would like to know more about how a regular expression can be composed, please refer to Wikipedia, specialized websites such as Regexr or a great number of good instructions on YouTube.
Administrator Task
Just like defining the 'Document Naming Convention', entering a RegEx is the task of an administrator. Regular Expressions are defined per project.
Open BIMcollab as Administrator.
Go to the 'Twin Administration' section.
Select 'Projects' from the left column...
... and then the desired project.
Then do NOT select the 'Regular Expressions' option, but select the Edit button to edit the project.
In the 'Edit project' page, you can create the expressions.
The RegEx Example
In our example, the RegEx is used with the following structure:
[A-Z]{3}-[A-Z]{3}-[0-9]{4}
Syntax explanation:
The official notation is /[A-Z]{3}-[A-Z]{3}-[0-9]{4}/ but the backslashes are intercepted by the BIMcollab software and can therefore be omitted.
[A-Z]{3} indicates that three capital letters will appear here. From A to Z, so no exceptions.
[0-9]{4} indicates that four digits from 0 to 9 will appear here.
In total, the defined code consists of two sets of three capital letters and four digits, separated by a hyphen. For example: ABC-DEF-1234
Add a Document
The RegEx as discussed above has been added to 'Document', the other four document types such as 'Drawing' or 'Model' are not filled with a RegEx.
A document is added to a project in BIMcollab in the following way:
Select the desired project in 'My Projects'.
Click on the 'Documents' section at the top of the blue bar.
You will now see the document overview page. Click on the [Add to project] button at the top right to add a document.
Select the document to be added to the project and [Upload] this document.
Now add the necessary metadata to the uploaded documents by clicking [Add information to uploaded files].
Fill in all the required fields (fields marked with an asterisk and any other fields you want to fill in). In the 'Document number' field, enter the document number in accordance with the RegEx definition.
Save the metadata. If the document number complies with the RegEx, it will be accepted; otherwise, a warning will appear next to the field.
The overview of project documents will be displayed.
RegEx and Workflows
A Workflow can be started based on a DocumentCode. Suppose that only drawings need to be stamped with ‘Intended for the construction site’ and other documents not, then a RegEx can be included in the conditions under which the Workflow is started, in which the document code of a drawing is recorded.
When the RegEx structure meets the DocumentCode of the newly added Drawing, the stamp as suggested is added to the drawing.


