Powerful Workflow Automation with RS2 Python Scripting

Published on: Mar 19, 2024 Updated on: Apr 26, 2024 3 minutes read
  • Daniel Wai, Geotechnical Software Developer
  • Kien Dang, FE Group Manager at Rocscience

We are excited to introduce the RS2 Python Scripting feature, designed to revolutionize your analysis workflows by automating tasks and enhancing efficiency.

Traditionally, adjusting models to accommodate new data is both time-consuming and prone to error. RS2’s Python Scripting automatically updates models in response to new geological data, which streamlines project timelines and enhances accuracy.

This new feature can also automate your complex manual workflows to increase productivity and ensure consistency.

Streamlining Workflows

With the RS2 Python Scripting feature, you can automate various RS2 modeling and analysis processes, as shown in Figure 1, including:

  • Opening, saving, computing and closing models
  • Importing material, joint and support properties
  • Extracting results for further analysis
Figure 1: RS2 Python Scripting can automate modelling, data extraction and analysis
Figure 1: RS2 Python Scripting can automate modelling, data extraction and analysis

Imagine developing project-specific workflows that can be easily shared across your company, for example:

  • Importing shared material databases directly into all models
  • Performing statistical analysis to evaluate the factor of safety
  • Computing, extracting and analyzing result history
  • Conducting parametric studies on the support design

This level of automation and customization ensures that your engineering analyses are efficient and highly effective, enabling you to confidently make informed decisions.

Getting Started

    Users of all levels can easily jump into automating RS2 workflows using the RocScript Editor (Figure 2), which offers an intuitive interface with built-in code completion and navigation features.

    Regardless of your programming expertise, you can effortlessly learn the syntax and start automating tasks immediately.

    The RocScript Editor also comes pre-installed with the RS2 Python API library and can be combined with other popular Python libraries, such as NumPy, Scikit-learn, TensorFlow, Pandas and Matplotlib. By combining these libraries, you can extract even deeper insights from your engineering analyses.

    Figure 2: RocScript Editor
    Figure 2: RocScript Editor

    Furthermore, you have the flexibility to install the RS2 API library to your own Python environment for fast integration of RS2 functionalities into your existing scripting workspaces.

    These seamless integration options enhance your workflow efficiency with no effort. Learn more here.

    Summary of New Feature

    The new RS2 Python Scripting feature offers the following benefits:

    • Automate RS2 workflows for users of all levels, and easily share workflows company-wide
    • Develop project-specific statistical, parametric and other analyses
    • Seamlessly integrate with existing Python environments

    Automate your complex manual workflows with RS2's new Python Scripting feature!

    Start a free trial of RS2 today.

    Free trials
    Back to top