SafetiBase is a tool designed for Collaborative sharing of structured H&S information using BIM and it’s based on the PAS 1192-6:2018 industry standards. Meanwhile, Dynamo is a visual scripting environment for designers working in Revit or Civils 3D. It’s brilliant for creating complex geometry and automating specific tasks.
In this article, we are going to explain to you how to bring SafetiBase & Revit model together using Dynamo & 3D Repo’s APIs. Here is what we are going to achieve:
Retrieve Risk information from 3D Repo using APIs
Filter the information for relevant fields
Create Risk Pins in Revit as they appear in 3D Repo (using Revit Family)
Add Risk information to the pins (Instance Parameters)
Let’s get you set up so that you can execute the Dynamo Script without a problem.
First of all, you will need access to the following:
Autodesk Revit 2021 or later
Dynamo for Revit (version 2.6.1 or later)
3D Repo account
Model access in 3D Repo
Download the Script & Revit Family 👇
If you are looking to test this workflow, you will need to upload a model to 3D Repo and create some example Risks. Alternatively, if you are going to use it on a live project, make sure that you have access to a model containing the risk information you need in Revit.
Activate Revit and load a model
Go to the Insert Tab and select Load Family
Locate the sample SafetiBase Pin.rfa
Go to the Manage Tab and select Dynamo Player
Dynamo Player configuration
Click on the Folder icon to open directory browser
Locate the folder with Dynamo Script
Select the folder and click OK
Click on the User Inputs icon to bring up the menu
In order to perform the API request, please fill out the following fields of information:
API Key for Authentication
Teamspace to locate a project
Model ID to locate a model
Family Name (should you choose to rename the SafetiBase Pin.rfa file)
Here is where you can find the information required to execute the script:
Teamspace: This is where your model exists. In this example, the model we are using is called Structure and it exists in the project called SafetiBase which belongs to Bogdan_D Teamspace
Model ID: This is a unique model ID number which we use in the API call. You can retrieve the ID number by going to the Model Settings menu as shown below. Copy & Paste the number to user inputs in Dynamo.
API Key: Use API Key to authenticate your API request. It is an easy way to gain access to your model data without using your Username & Password. Therefore, it is important to not disclose your API key to anyone who is not authorised to gain access to your project’s data. Treat it as your personal password.
Execute the Dynamo Script
Once you have gathered all the relevant information just copy & paste it into the user input fields. All that’s left to do is click on the Play button in Dynamo player as shown below. SafetiBase pins will appear in your model 👇
Add annotative tags to the SafetiBase Pins
Since the family instances of SafetiBase pins exist in the model space, you'll see them both in 3D & 2D views, such as floor plans, sections or elevations. If you wish to annotate them in your drawings, you'll need to follow the steps above and make the following few changes along the way:
During Revit Configuration steps, load the SafetiBase Pin_Shared Parameters.rfa family into your project instead. It contains shared instance parameters which annotation tags can identify.
Load the example SafetiBase Pin Tag.rfa family into your project.
SafetiBase Pin.txt file contains all of the shared parameters used in both pin & annotation tag families. Use it if you're creating your own families.
Here's how our example annotation tag would look on the drawings with the SafetiBase pin (you can change it to suit your project requirements). 👇