SafetiBase – Retrieve Risk Information

Table of Contents
You are here:

Introduction

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)

Initial Setup

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:

  1. Autodesk Revit 2021
  2. Dynamo for Revit (version 2.5.0.7586 or later)
  3. 3D Repo account
  4. Model access in 3D Repo
  5. 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 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

Revit

  1. Activate Revit and load a model
  2. Go to the Insert Tab and select Load Family
  3. Locate the sample SafetiBase Pin.rfa
  4. Go to the Manage Tab and select Dynamo Player

Dynamo Player

  1. Click on the Folder icon to open directory browser
  2. Locate the folder with Dynamo Script
  3. Select the folder and click OK
  4. Click on the User Inputs icon to bring up the menu
User Inputs

In order to perform the API request, please fill out the following fields of information:

  • API Key for Authentication
  • Teamspace to locate project
  • Model ID to locate 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:

  • 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 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.

 

Dynamo Script