• 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
Serving the Numerical Simulation community since 1989
  • Contact Us
  • Register
Login

Forgot Password?

Login
ESRDESRD
ESRDESRD
  • 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

Can I Write Scripts to Automate StressCheck Professional?

Home Can I Write Scripts to Automate StressCheck Professional?
Filter by categories Clear Results
  • Installation & Licensing

    • System Requirements

      • What Are the StressCheck System Requirements?
      • What Is the StressCheck License Agreement?
    • Software Installation

      • On Which Operating Systems are ESRD Software Products Supported?
      • Are All ESRD Software Products Compatible with Windows 7, 8 and 10?
      • How Do I Install ESRD Software Products On A Desktop Machine?
      • How Do I Perform A Silent Installation Of ESRD Software Products?
      • Is There A License-Free Version Of StressCheck I Can Install?
      • How Do I Fix StressCheck GUI Scaling Issues?
    • License Server & FlexNet

      • How Do I Find My HOST ID For ESRD Software Product Licensing?
      • How Do I Install A New FlexNet License Server Dedicated To Providing ESRD Software Licensing?
      • How Do I Set Up Rules in Windows Firewall for the FlexNet License Manager?
      • How Do I Install ESRD Software Licenses On An Existing FlexNet License Server?
      • How Do I Control Which Users Can Access License Features?
      • How Do I Replace ESRD Software Licenses On A FlexNet License Server?
      • How Do I Specify My ESRD Software Product License File Or License 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 Query the Path to My Current License File or Server?
      • How Do I Point to a New License File or Server via Environment Variable?
      • How Do I Remove References To ESRD Software License Pointers?
      • How Often Do ESRD Software Products Check Licensing?
  • 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 Does StressCheck Professional Use As Its CAD Kernel?
      • What CAD Formats And Versions Are Supported in StressCheck Professional?
      • How Do I Move My Imported CAD to A Different Location?
      • Why Do I Have Duplicate Geometry or Mesh Objects?
      • Why Do I Receive An Error Message About Associativity When Creating or Deleting Geometry?
      • What Ranges Are Applicable for Offset, P1 and P2 (Min/Max) Inputs?
      • What's the Difference Between DeLast and Undo?
      • What Intrinsic Functions and Mathematical Expressions Are Supported in StressCheck?
      • How Do I Round A Parameter To Nearest Integer Value?
      • How Do I Expand the Material Property Database?
      • How Do I Increase the Nonlinear Material Stress-Strain Plot Resolution?
      • How Do I Ensure My Model Assignments Persist?
      • Can I Assign Material Properties to Bodies/Parts Directly?
      • How Do I Select Internal Surfaces for Locate Sets?
      • How Can I Update All Model Sets?
      • What are the 3D Bearing Load Requirements?
      • How Do I Define and Assign a Bending Moment?
      • What's the Difference Between TLAP-Traction Options Near Faces and All Faces?
      • What is the Difference Between TLAP-Bearing Options IMO and Default?
      • Why Do I Get An Error Message During Application Of TLAP-Bearing?
      • Why Am I Getting An Incorrect Load Check Summation For TLAP-Bearing?
      • When Can I Use Rigid Body or Node Constraints?
      • How Do I Select the Contact Constant For Multi-Body Contact?
      • What Are Some Tips & Tricks for Using Parts and Solution Configurations?
      • Show all articles ( 9 ) Collapse Articles
    • Meshing & Discretization

      • What Do the MeshSim Global Automeshing Parameter Inputs Affect?
      • What is the Size Input for Local Automeshing?
      • What Is The General Automeshing Strategy For A 3D Complex Solid?
      • What's the Difference Between Quadratic and Geometric Mapping?
      • Why Is There a Recommended Maximum P-level for Quadratically Mapped Automeshes?
      • Can I Delete An Automesh Without Deleting the Global Mesh Record?
      • How Do I Troubleshoot Small-Feature Automeshes?
      • How Do I Debug Problem Meshing Face Error Messages?
      • What Are Some Tips for Automeshing 3D Cracks for Accurate SIF Computation?
      • How Much Difference in Mesh Density Across a Contact Region is Acceptable?
    • Model Visualization & Display

      • How Do I Fix StressCheck GUI Scaling Issues?
      • How Can I Change My Display Format?
      • How Do I Display Object Numbering?
      • Why Do I Have Duplicate Geometry or Mesh Objects?
      • Why Are Certain Objects in a Model Not Displayed?
      • Why Do Small Features Sometimes Appear Distorted?
      • 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?
      • What Does the Object Resolution in View Controls Do?
      • What Is the Midsides Input, and What Does It Control?
      • How Do I Control the Display of Load Arrows?
      • What Can Affect Fringe Plot Rendering Rates?
      • How Do I Round A Parameter To Nearest Integer Value?
      • How Do I Select Internal Surfaces for Locate Sets?
      • What Are Some Tips & Tricks for Using Parts and Solution Configurations?
    • Solver & FEA Implementation

      • Is StressCheck Multi-Threaded? And How Are CPU Cores Allocated?
      • What Can Affect Model Performance and Integrity?
      • Can I Connect Elements of Different References (i.e. 2D to 3D)?
      • What is a P-Extension?
      • What's the Difference Between Quadratic and Geometric Mapping?
      • Why Is There a Recommended Maximum P-level for Quadratically Mapped Automeshes?
      • Can I Solve Models with Mixed Element Mapping?
      • Are Element Distortion Effects Lessened at Higher P-Levels?
      • How Do I Report the Final P-Level of Each Solved Element?
      • What Does the LAPACK Solver Error Typically Mean?
      • How Can I Perform a Compression Only Spring Analysis?
      • Can the Modal/Buckling Solver Be Combined with Multi-Body Contact?
      • Why is a Nonlinear Solution Failing?
      • How Do I Improve Stress Fitting Errors for 3D ITP Solutions?
      • What Are Some Tips & Tricks for Using Parts and Solution Configurations?
    • Results Plotting & Extractions

      • How Do I Check My Solution for Errors?
      • How Do I Report the Final P-Level of Each Solved Element?
      • What Intrinsic Functions and Mathematical Expressions Are Supported in StressCheck?
      • Can I Use Formulaic Expressions for Results Processing?
      • What Can Affect Fringe Plot Rendering Rates?
      • How Do I View Radial and Hoop Stresses/Strains?
      • How Do I Compute the Average Stress Over An Object?
      • How Do I Combine Load Cases in Results?
      • What Ranges Are Applicable for Offset, P1 and P2 (Min/Max) Inputs?
      • How Can I Check Load Transfer, Equilibrium and Nodal Reactions In Results?
      • Why Are There Stress "Spikes" In My TLAP-Traction Application Surface?
      • What Is the Interpretation of the Buckling Load Factor in an Eigenvalue Buckling Analysis?
  • StressCheck Applications & Advanced Features

    • COM API & Automation

      • Can I Write Scripts to Automate StressCheck Professional?
    • Global-Local Analysis

      • How Do I Move My Imported CAD to A Different Location?
      • How Is the Moment Summation in the Case Definitions Table Computed?
      • What Is The Applicability Of TLAP-Traction?
      • What's the Difference Between TLAP-Traction Options Near Faces and All Faces?
      • Why Are There Stress "Spikes" In My TLAP-Traction Application Surface?
      • What is the Difference Between TLAP-Bearing Options IMO and Default?
      • Why Do I Get An Error Message During Application Of TLAP-Bearing?
      • Why Am I Getting An Incorrect Load Check Summation For TLAP-Bearing?
    • Multi-Body Contact

      • What Are Some Common Multi-Body Contact Issues?
      • How Much Difference in Mesh Density Across a Contact Region is Acceptable?
      • How Do I Select the Contact Constant For Multi-Body Contact?
      • Can I Solve Models with Mixed Element Mapping?
      • How Can I Check Load Transfer, Equilibrium and Nodal Reactions In Results?
      • How Can I Improve Multi-Body Contact Efficiency?
      • Do I Need the Nonlinear Solver for Multi-Body Contact?
      • What are the Nonlinear Solver Limitations with Multi-Body Contact?
      • Can the Modal/Buckling Solver Be Combined with Multi-Body Contact?
    • Nonlinear Analysis

      • How Do I Increase the Nonlinear Material Stress-Strain Plot Resolution?
      • Which Nonlinear Solution Type (i.e. Material or General) Should I Choose?
      • Why is a Nonlinear Solution Failing?
      • How Can I Perform a Compression Only Spring Analysis?
      • What is Required in a Fastener Element Analysis?
      • When Is Incremental Plasticity Theory (IPT) a Viable Option?
      • How Do I Improve Stress Fitting Errors for 3D ITP Solutions?
      • Do I Need the Nonlinear Solver for Multi-Body Contact?
      • 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?
    • Fracture Mechanics Analysis

      • What Are Valid Extractions of Stress Intensity Factors (SIF)?
      • What Are Some Tips for Automeshing 3D Cracks for Accurate SIF Computation?
      • Why Are There SIF Drops At Free 3D Faces?

Can I Write Scripts to Automate StressCheck Professional?

< Back to Software FAQ 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).

Table of Contents

  • Scripting with StressCheck’s COM API
    • Excel VBA: Set StressCheck Reference and Initiate a New StressCheck.Application
    • MATLAB: Launch a StressCheck.Application COM ActiveX Server
    • Python: Import win32com and use EnsureDispatch to Initiate a StressCheck.Application

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?
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

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits, as outlined in our Cookie Policy. You may adjust your cookie preferences within Cookie settings.
ACCEPT ALL
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT
[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.