Example Python Files

From SysCAD Documentation
Jump to navigation Jump to search

Navigation: User Guide ➔ COM Automation ➔ Python Automation

Python Setup Python Examples Python Script Optimisation Visulisation Python GUI Tags and Data
Installation &
Troubleshooting
List of Examples Simple Script
(pywin32)
SysCAD COM
Python Class
Automated
Model Testing
Constrained FEM
(numpy|matplotlib)
Optimisation
(numpy|scipy)
Adding Plots
(numpy|matplotlib)
Dynamic
with GUI
Accessing Data
(sqlite3|pandas)

Python Examples

SysCAD COM Interface Class

  • SysCAD COM Interface Class - The syscadif.py module wraps essential SysCAD COM operations and is used throughout most of the examples below.

Python Integration Examples

These examples show how to integrate Python with SysCAD using the COM interface via pywin32:

Python Script Examples for Generating Report Tags

  • Generate Species Tags for Stream Report - Creates structured species tag entries for use in SysCAD stream reports, based on a user-defined input file. This simplifies the process of reporting multiple species across various flow variables.
  • Generate Tags for PSD Stream Report - Generates particle size distribution (PSD) tags for SysCAD reports, formatted for multi-column layouts. Ideal for projects with multiple ores and extensive size interval data.

Python Optimisation Examples

Python Visualisation Examples

These examples demonstrate how to use matplotlib to visualise data sets:

Plotting Data from the Clipboard:

Python GUI Examples

These examples show how to use COM to build Python-based GUI elements for interactive control:

Python Script Examples for Programmatic Model Generation

These examples demonstrate how to use Python with COM to insert models and graphics into a SysCAD project.

Python Script Examples for updating databases

These examples show how to use Python and SQLite to update .db3 database files used in SysCAD.

Other Example

  • External DLL Integration - Demonstrates how to drive a dynamic SysCAD project using Python while performing calculations in an external DLL.