• About
    • Who We Are
    • S.A.F.E.R. Simulation
    • Partners & Providers
    • News & Events
    • Careers
    • Contact Us
  • Applications
    • What We Solve
    • Aerospace & Defense
    • Detailed Stress
    • Composites
    • Fracture Mechanics
    • Residual Stress
    • Sim Apps
  • Products
    • What We Develop
    • StressCheck Professional
      • StressCheck Core
      • Solvers
      • Advanced Modules
      • Utilities
    • StressCheck Apps
      • CAE Handbook
      • StressCheck Tool Box
  • Support
    • How We Can Help
    • Getting Started
    • Software FAQ’s
    • Documentation
    • Training
    • Consulting
    • Product Updates
  • Simulation
    • How We Simulate
    • Simulation Governance
    • History of FEA
    • Dictionary & Terms
    • Simulation FAQ
    • Simulation References
  • Resource Library
    • Case Studies
    • Webinars
    • Product Demos
    • Product Downloads
    • StressCheck Tutorials
    • Sim App & API Development
  • Contact Us
  • Register
Login

Forgot Password?

Login
ESRD ESRD ESRD ESRD
  • About
    • Who We Are
    • S.A.F.E.R. Simulation
    • Partners & Providers
    • News & Events
    • Careers
    • Contact Us
  • Applications
    • What We Solve
    • Aerospace & Defense
    • Detailed Stress
    • Composites
    • Fracture Mechanics
    • Residual Stress
    • Sim Apps
  • Products
    • What We Develop
    • StressCheck Professional
      • StressCheck Core
      • Solvers
      • Advanced Modules
      • Utilities
    • StressCheck Apps
      • CAE Handbook
      • StressCheck Tool Box
  • Support
    • How We Can Help
    • Getting Started
    • Software FAQ’s
    • Documentation
    • Training
    • Consulting
    • Product Updates
  • Simulation
    • How We Simulate
    • Simulation Governance
    • History of FEA
    • Dictionary & Terms
    • Simulation FAQ
    • Simulation References
  • Resource Library
    • Case Studies
    • Webinars
    • Product Demos
    • Product Downloads
    • StressCheck Tutorials
    • Sim App & API Development
Filter by categories Clear Results
  • Installation & Licensing
    • Software Installation
      • Is There A License-Free Version Of StressCheck I Can Install?
      • How Do I Perform A Silent Installation Of ESRD Software Products?
      • How Do I Install ESRD Software Products On A Desktop Machine?
      • Are All ESRD Software Products Compatible with Windows 7, 8 and 10?
      • On Which Operating Systems are ESRD Software Products Supported?
    • License Server & FlexNet
      • How Do I Query the Path to My Current License File or Server?
      • How Do I Control Which Users Can Access License Features?
      • How Do I Point to a New License File or Server?
      • What If My Desktop Machine Gets "Cannot Connect To License Server System" Error?
      • What If ESRD Products Fail To Open With A Valid Node-Locked License?
      • How Do I Replace ESRD Software Licenses On A FlexNet License Server?
      • How Do I Install A New FlexNet License Server Dedicated To Providing ESRD Software Licensing?
      • How Do I Install ESRD Software Licenses On An Existing FlexNet License Server?
      • How Often Do ESRD Software Products Check Licensing?
      • How Do I Find My HOST ID For ESRD Software Product Licensing?
      • How Do I Remove References To ESRD Software License Pointers?
      • How Do I Specify My ESRD Software Product License File Or License Server
      • Can I Run My FlexNet License Server From My Desktop Machine?
  • StressCheck Usage & Implementation
    • File I/O
      • What's the Difference Between the SCW and SCP File?
      • What Can Affect Model Performance and Integrity?
    • Model Inputs
      • What are the 3D Bearing Load Requirements?
      • Can I Assign Material Properties to Bodies/Parts Directly?
      • How Do I Ensure My Model Assignments Persist?
      • What Intrinsic Functions and Mathematical Expressions Are Supported in StressCheck?
      • What Ranges Are Applicable for Offset, P1 and P2 (Min/Max) Inputs?
      • What's the Difference Between TLAP-Traction Options Near Faces and All Faces?
      • What is the Difference Between TLAP-Bearing Options IMO and Default?
      • How Do I Expand the Material Property Database?
      • How Can I Update All Model Sets?
      • What Are Some Tips & Tricks for Using Parts and Solution Configurations?
      • How Do I Move My Imported CAD to A Different Location?
      • How Do I Increase the Nonlinear Material Stress-Strain Plot Resolution?
      • Why Do I Have Duplicate Geometry or Mesh Objects?
      • How Do I Select Internal Surfaces for Locate Sets?
      • When Can I Use Rigid Body or Node Constraints?
      • How Do I Round A Parameter To Nearest Integer Value?
      • Why Do I Receive An Error Message About Associativity When Creating or Deleting Geometry?
      • How Do I Define and Assign a Bending Moment?
      • What's the Difference Between DeLast and Undo?
      • Why Am I Getting An Incorrect Load Check Summation For TLAP-Bearing?
      • Why Do I Get An Error Message During Application Of TLAP-Bearing?
      • How Do I Select the Contact Constant For Multi-Body Contact?
      • What Does StressCheck Professional Use As Its CAD Kernel?
      • What CAD Formats And Versions Are Supported in StressCheck Professional?
      • Show all articles ( 9 ) Collapse Articles
    • Meshing & Discretization
      • Can I Delete An Automesh Without Deleting the Global Mesh Record?
      • How Much Difference in Mesh Density Across a Contact Region is Acceptable?
      • Why Is There a Recommended Maximum P-level for Quadratically Mapped Automeshes?
      • What's the Difference Between Quadratic and Geometric Mapping?
      • How Do I Debug Problem Meshing Face Error Messages?
      • What Do the MeshSim Global Automeshing Parameter Inputs Affect?
      • What is the Size Input for Local Automeshing?
      • How Do I Troubleshoot Small-Feature Automeshes?
      • What Is The General Automeshing Strategy For A 3D Complex Solid?
      • What Are Some Tips for Automeshing 3D Cracks for Accurate SIF Computation?
    • Model Visualization & Display
      • What Can Affect Fringe Plot Rendering Rates?
      • Why Are Certain Objects in a Model Not Displayed?
      • What Are Some Tips & Tricks for Using Parts and Solution Configurations?
      • Why Do Small Features Sometimes Appear Distorted?
      • Why Do I Have Duplicate Geometry or Mesh Objects?
      • How Do I Select Internal Surfaces for Locate Sets?
      • How Do I Control the Display of Load Arrows?
      • How Do I Round A Parameter To Nearest Integer Value?
      • How Do I Use the Edit Toolbar to Select, DeSelect, Blank and Unblank Objects?
      • How Do I Use Sets to Select and View Groups of Elements and Other Objects?
      • How Can I Change My Display Format?
      • What Does the Object Resolution in View Controls Do?
      • How Do I Display Object Numbering?
      • What Is the Midsides Input, and What Does It Control?
    • Solver & FEA Implementation
      • Can I Solve Models with Mixed Element Mapping?
      • What is a P-Extension?
      • Are Element Distortion Effects Lessened at Higher P-Levels?
      • What Can Affect Model Performance and Integrity?
      • Is StressCheck Multi-Threaded? And How Are CPU Cores Allocated?
      • What Are Some Tips & Tricks for Using Parts and Solution Configurations?
      • How Do I Report the Final P-Level of Each Solved Element?
      • What's the Difference Between Quadratic and Geometric Mapping?
      • Why is a Nonlinear Solution Failing?
      • How Can I Perform a Compression Only Spring Analysis?
      • What Does the LAPACK Solver Error Typically Mean?
      • Can I Connect Elements of Different References (i.e. 2D to 3D)?
      • Why Is There a Recommended Maximum P-level for Quadratically Mapped Automeshes?
      • Can the Modal/Buckling Solver Be Combined with Multi-Body Contact?
      • How Do I Improve Stress Fitting Errors for 3D ITP Solutions?
    • Results Plotting & Extractions
      • How Do I Compute the Average Stress Over An Object?
      • What Intrinsic Functions and Mathematical Expressions Are Supported in StressCheck?
      • What Ranges Are Applicable for Offset, P1 and P2 (Min/Max) Inputs?
      • What Is the Interpretation of the Buckling Load Factor in an Eigenvalue Buckling Analysis?
      • Can I Use Formulaic Expressions for Results Processing?
      • How Do I Report the Final P-Level of Each Solved Element?
      • What Can Affect Fringe Plot Rendering Rates?
      • How Do I Check My Solution for Errors?
      • How Do I Combine Load Cases in Results?
      • How Do I View Radial and Hoop Stresses/Strains?
      • Why Are There Stress "Spikes" In My TLAP-Traction Application Surface?
      • How Can I Check Load Transfer, Equilibrium and Nodal Reactions In Results?
  • StressCheck Applications & Advanced Features
    • COM API & Automation
      • Can I Write Scripts to Automate StressCheck Professional?
    • Global-Local Analysis
      • How Is the Moment Summation in the Case Definitions Table Computed?
      • What's the Difference Between TLAP-Traction Options Near Faces and All Faces?
      • What is the Difference Between TLAP-Bearing Options IMO and Default?
      • How Do I Move My Imported CAD to A Different Location?
      • Why Are There Stress "Spikes" In My TLAP-Traction Application Surface?
      • What Is The Applicability Of TLAP-Traction?
      • Why Am I Getting An Incorrect Load Check Summation For TLAP-Bearing?
      • Why Do I Get An Error Message During Application Of TLAP-Bearing?
    • Multi-Body Contact
      • How Can I Improve Multi-Body Contact Efficiency?
      • Do I Need the Nonlinear Solver for Multi-Body Contact?
      • What Are Some Common Multi-Body Contact Issues?
      • Can the Modal/Buckling Solver Be Combined with Multi-Body Contact?
      • What are the Nonlinear Solver Limitations with Multi-Body Contact?
      • How Do I Select the Contact Constant For Multi-Body Contact?
      • How Can I Check Load Transfer, Equilibrium and Nodal Reactions In Results?
      • How Much Difference in Mesh Density Across a Contact Region is Acceptable?
      • Can I Solve Models with Mixed Element Mapping?
    • Nonlinear Analysis
      • When Is Incremental Plasticity Theory (IPT) a Viable Option?
      • How Do I Increase the Nonlinear Material Stress-Strain Plot Resolution?
      • Why is a Nonlinear Solution Failing?
      • How Can I Perform a Compression Only Spring Analysis?
      • Do I Need the Nonlinear Solver for Multi-Body Contact?
      • Which Nonlinear Solution Type (i.e. Material or General) Should I Choose?
      • What is Required in a Fastener Element Analysis?
      • What are the Nonlinear Solver Limitations with Multi-Body Contact?
      • Can the Principal Stresses Be Greater Than the Maximum von Mises Stress for a Material Nonlinear Analysis?
      • How Do I Improve Stress Fitting Errors for 3D ITP Solutions?
    • Fracture Mechanics Analysis
      • What Are Valid Extractions of Stress Intensity Factors (SIF)?
      • Why Are There SIF Drops At Free 3D Faces?
      • What Are Some Tips for Automeshing 3D Cracks for Accurate SIF Computation?

Can I Write Scripts to Automate StressCheck Professional?

< Documentation Home

“Hands-off” automation of StressCheck® Professional pre-processing, solutions and live dynamic processing is available via StressCheck®‘s COM API. The StressCheck® COM API includes access to the toolkit of StressCheck®‘s objects, methods and properties to allow for solutions to repetitious and/or challenging FEA models and the development of Simulation Applications (Sim Apps).

Below is an example of a fracture mechanics Sim App:

Customized functions and subroutines may be written and executed either via scripting or a distributable Sim App product which uses StressCheck® as its FEA engine. In order to get started with the StressCheck® COM API, the following are required:

  • A complete StressCheck® installation.
  • If using a concurrent license server, enough available licenses for the StressCheck® modules called during execution of the script (e.g. StressCheck® Core, Linear Elasticity solver, etc.).
  • A scripting platform (e.g. MATLAB by MathWorks, Microsoft Excel VBA, Python, etc.) or Windows development environment (e.g. Microsoft Visual Studio).
  • Referencing/importing/using the StressCheck® COM API (more below).

 

Scripting with StressCheck®‘s COM API

The following demonstrates in several programming languages (Excel VBA, MATLAB and Python) how to get started with the StressCheck® COM API for scripting. Note: in the below examples, the ® character is not required:

Excel VBA: Set StressCheck® Reference and Initiate a New StressCheck®.Application

In Excel VBA, it is very easy to automate StressCheck® because all that is required is an installation of Microsoft Office Excel. The following video demonstrates how to set a reference to the latest StressCheck® Application Object library in VBA’s References list, and then initiate a new StressCheck® Application via VBA scripting:

More examples of Excel VBA scripting with StressCheck®:

  • Helpful Hints and Tips: Excel VBA Basic Example
  • Helpful Hints and Tips: Excel VBA 3D Automeshed Plate Example

 

MATLAB: Launch a StressCheck®.Application COM ActiveX Server

In MATLAB, it is simple enough to create a new ActiveX server StressCheck®.Application process and save the commands as an M-file (.m):

% Launch StressCheck® application as a COM ActiveX Server SC = actxserver(‘StressCheck®.Application’);

For an example of MATLAB scripting with StressCheck®:

  • Helpful Hints and Tips: Matlab COM API Basic Example

 

Python: Import win32com and use EnsureDispatch to Initiate a StressCheck®.Application

Before using the StressCheck® COM API with Python, it is necessary to install the latest Python for Windows and PyWin32 extensions:

  • Python for Windows
  • PyWin32 (required for COM API’s)

 

Once these are installed, you may write a Python script (.py) and execute via command line or Pythonwin. Import win32com in the Python script to open a new StressCheck®.Application:

import win32com.client as win32 sc = win32.gencache.EnsureDispatch(‘StressCheck®.Application’)

For an example of Python scripting with StressCheck®:

  • Helpful Hints and Tips: Python Example #1

 

For more information on the StressCheck® COM API implementation, refer to COM Interface Overview.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Sections

Subscribe to ESRD News & S.A.F.E.R. Simulation

Want to be a part of the discussion? Sign up to receive blog posts and other ESRD updates:

Member Portal

  • Member Login
  • Member Registration

 

Contact Us

© 2021 · Engineering Software Research & Development, Inc. | Terms & Conditions | Privacy & Cookie Policy | Software License Agreement | Software Maintenance and Technical Support Policy

[contact-form-7 id="885" title="Untitled"]
ESRD, Inc. collects your information for the sole purpose of identifying interest in our products and technologies. The information you provide herein will not be shared with any other organization. Please ensure the fields are up to date and click "Download" to download the software.