Running Analysis
Analysis in the SPACE GASS API is asynchronous — when you start an analysis, the API returns immediately with a run ID. You then poll for progress until the run completes. This guide covers the common patterns from simple scripting to advanced multi-run monitoring.
How It Works
- Start an analysis — returns an
AnalysisRunwith arunIdand initial status - Poll the run status using the
runIdat regular intervals - Check for a terminal status:
Completed,Failed, orCancelled - Query results once completed
Simple Script — Wait for Completion
Most scripts just need to run an analysis and wait. Here is a simple helper that polls until the analysis finishes, then returns the final status:
The WaitForCompletion helper turns the async polling into a simple
blocking call — your script just waits until the analysis is done
before moving on. This is the pattern you will use most often in
scripts.
Pre-Check with Analysis Info
Before running an analysis, you can call the Info endpoint to see which load cases already have results — and which still need to be analysed. This avoids re-running cases that are already complete, which saves time on large models.
Analysis.Static.Info (and the equivalent Buckling.Info and
DynamicFrequency.Info) returns:
| Field | Description |
|---|---|
HasResults | true if any case has stored results for this analysis type |
LoadCases | Per-case breakdown — each entry has a LoadCase Id and HasResults flag |
NotAnalyzed | SG list-format string of case Ids that have not been analysed — ready to pass straight into a run request |
Check which cases have been analysed
Filter to a specific range
Pass a loadCases filter to check a subset. The NotAnalyzed field
returns only the intersection of your filter with the not-analysed
set — you can feed it directly into the run request.
This pattern is especially useful in automation workflows where a model is re-analysed incrementally — new load cases are added and only the missing ones need to be run, leaving existing results intact.
Running Multiple Analyses in Sequence
The API processes analysis runs in a queue. You can start multiple analyses and they will execute in order. Poll the last run ID to know when all analyses are complete:
Monitoring Progress
For longer analyses you may want to display progress as it runs.
The AnalysisRun.Progress object provides step labels, iteration
percentages, and load case status:
Cancelling a Run
You can cancel a running or queued analysis by calling DELETE on
the run:
The run transitions to Cancelling and then Cancelled once the
solver has stopped.
Analysis Run Lifecycle
| Status | Description |
|---|---|
Queued | Run is waiting in the queue |
Running | Analysis is actively executing |
Cancelling | Cancellation requested, waiting for solver to stop |
Completed | Analysis finished successfully — results are available |
Failed | Analysis encountered an error — check errorMessage |
Cancelled | Analysis was cancelled before completion |
Advanced: Real-Time Monitoring Application
For a full example of an interactive monitoring application that tracks multiple concurrent runs with live progress bars, elapsed timers, and error/warning display, see the AnalysisMonitor WPF example in the repository.

