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 case, we are going 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 an API
- 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 Parameter)
Let’s get you setup so that you can execute the Dynamo Script without a problem.
First of all you will need access to the following:
- Autodesk Revit 2021
- Dynamo for Revit (version 188.8.131.5286 or later)
- 3D Repo account
- Model access in 3D Repo
- Download the Script & Revit Family
Alternatively, if you are looking to use it on a live project, make sure that you have access to a model containing the risk information you need.
Revit & Dynamo Configuration
- 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
- 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 above information required to execute the script:
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 our 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.
Run the 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.