Margin of safety > Custom methods
Custom methods
You can create a custom method by developing and, if applicable, compiling an external routine. A custom method can account for a single failure mode like the built-in methods, or it can account for multiple failure modes.
For Windows, you can develop custom methods in Visual Basic, C++, C#, or Python. When you develop custom methods in a compiled language, you must have an NX Open environment.
When you develop custom methods in multiple languages, each language must have its own folders. For example, you cannot place methods developed in C++ in the same folder with methods developed in Visual Basic, C#, or Python.
When the external routines are properly linked to Simcenter 3D, the custom methods appear and are selectable in the Calculation - Method Selection dialog box, and data entry boxes for all of the parameters related to the custom method such as material properties and physical dimensions appear in the Calculation Creation dialog box.
File requirements
To create a custom method, the following files are required:
A Visual Basic, C++, C#, or Python file that contains the code that calculates the margin of safety. In this file, you can include the calculations for multiple failure modes.
An XML file for each calculation in the Visual Basic, C++, C#, or Python file. The XML file contains the definition of the data entry boxes that appear in the Calculation Creation dialog box.For a complete listing of elements and attributes that you can use in the XML file, see Elements and attributes of XML files.
An XMD file that links each XML file to a specific calculation in the Visual Basic, C++, C#, or Python file.The XMD file must have the same name as the Visual Basic, C#, or Python file, or the same name as the DLL file that results from compiling the C++ file.Note: The XMD file is an XML file with the .xmd extension.
All of the associated XML files and XMD file must reside in the same folder as the Visual Basic, C++, C#, or Python file.
Load case attributes
You can optionally assign a strength attribute and the three other attributes to load cases. You can use these attributes to trigger conditional behavior in custom methods.
Analysis building blocks
The NX Open API includes analysis building blocks (ABBs) that you can use in custom methods. The ABBs include the following:
Code for all of the built-in methods.
Material utilities like the Ramberg-Osgood stress-strain relation.
User and method aggregation
In the XML file for each failure mode, the load extraction parameter has a mandatory attribute called Aggregation.
When you set Aggregation to User, the load extraction provides a single value per load case.The practical results of setting aggregation to User are that in the Load Extraction dialog box, the Aggregation list is present, and in the Calculation Creation dialog box, manual load extraction is available.All of the built-in methods have user aggregation.
When you set Aggregation to Method, the load extraction provides a single value per load case per node or element in the selection.The practical results of setting aggregation to Method are that in the Load Extraction dialog box, the Aggregation list is not present, and in the Calculation Creation dialog box, manual load extraction is not available.With method aggregation, you are not limited to the options in the Aggregation list to extract a single value from the set of results.For example, with method aggregation, for each load case, you can perform a statistical analysis on the result for each node or element to characterize the variation in the results and then perhaps use the +3σ value in the margin of safety calculation.With method aggregation, you can also use results across load cases.For example, for a given node or element, you can pick the worst case result from those generated by each load case to use in the margin of safety calculation.
Displaying custom methods
By default, the built-in methods are always displayed in the Calculation - Method Selection dialog box. If you also want to display custom methods in the Calculation - Method Selection dialog box, you must link the folders that contain the custom methods to Simcenter 3D.
To link a single folder that contains custom methods to Simcenter 3D, set the following environment variable:UGII_AEROSTRUCTURES_MODULE_PATH=
To link multiple folders that contain custom methods to Simcenter 3D, set the following environment variable:UGII_AEROSTRUCTURES_MODULE_PATH=
; ; ;......where each path is to a different folder.
To exclude the built-in methods from being displayed in the Calculation - Method Selection dialog box, set the following environment variable:
UGII_AEROSTRUCTURES_EXCLUDE_STD_METHODS=true
Reloading updated custom methods
When you edit, add, or remove files for a custom method, you can update Simcenter 3D with the changes by clicking Reload Methods in the Calculation - Method Selection dialog box. Doing so allows you to modify a custom method and then use it without having to quit and restart the software.
Learn more
Custom method example
Creating tables and groups
Interfacing with external files
Diagrams for custom methods
Specifying default values for parameters
Bulk processing of calculations
Interfacing with external post-processors
Look up more details
Elements and attributes of XML files
Quick links
Command reference
Pre/Post video examples
Bulk Entry Descriptions
Simcenter 3D tutorials
Browse Simcenter 3D help by product area
Margin of Safety methods documentation
Custom methods, Simcenter 3D 2021.1 Series
© 2020 Siemens
window.mainLanguage="en_US"
window.delivId=""
window.projectId=""
MathJax.Hub.Config({ TeX: { extensions: ["autoload-all.js"] }, tex2jax: { displayMath: [ ] }, "SVG": { scale: 125 } });
Source: https://docs.sw.siemens.com/en-US/doc/289054037/PL20200601120302950.advanced/xid1484105 · retrieved 2026-07-17