Margin of safety > Custom methods
Interfacing with external post-processors
You can interface calculations with custom methods to external post-processing software. This allows you to customize the post-processing of margin of safety results or use post-processing tools outside of Simcenter 3D.
After you have created the interface, in the Simulation Navigator, when you right-click the node of the calculation, the drop-down menu contains the Launch Post Processing command. The Launch Post Processing command is active when the calculation has been solved. When you choose the Launch Post Processing command, the software passes the margin of safety results for the calculation to the external post-processor.
Visual Basic example
This example shows how to get input parameter values, and output parameter values, with looping on the number of load cases for margin of safety results. Simcenter 3D stores the results only. You can write the external post-processing software to process the results in a specific way.
Method registration:
Automatically completed if PostProcess() method is defined and compilable in the script.
Method implementation:
Public Function PostProcess(ByRef mCalc As MarginCalculation) Dim str1 As string = mCalc.GetInputStringValue("Str1") Dim val1 As double = mCalc.GetInputScalarValue("Len1") Dim val2 As double = mCalc.GetInputScalarValue("Siz1") Dim loadCaseArray As string() mCalc.GetResultLoadCaseNames(LoadCaseArray) Dim value As double Dim values As double() ReDim Preserve values(loadCaseArray.Length) Dim allowable As double = mCalc.GetResultOutputScalarValue("Result", "FM1", "") Dim i As Integer For i = 0 To loadCaseArray.Length - 1 value = mCalc.GetResultMsValue("FM1 ", loadCaseArray(i)) values(i) = value Next Return True
C++ example
This example shows how to get input parameter values, and output parameter values, with looping on the number of load cases for margin of safety results. It is based on the existing built-in Column Euler method. Simcenter 3D stores the results only. You can write the external post-processing software to process the results in a specific way.
Method registration:
lib->RegisterEvaluate("MS_Column_Euler", 1, make_callback(CaeSim_AeroStruct_Method_MS_Column_Euler));lib->RegisterPostProcess("MS_Column_Euler", 1, make_callback(CaeSim_AeroStruct_Method_MS_Column_Euler_PostProcess));
Method implementation:
extern "C" bool CaeSim_AeroStruct_Method_PostProcess(MarginCalculation *mCalc){ static const char* failuremode = "column_buckling"; NXOpen::Unit *unit = calculation->GetResultOutputScalarUnit("sigmacr"); double val1 = calculation->GetInputScalarValue("A"); double val2 = calculation->GetInputScalarValue("I"); double val3 = calculation->GetInputScalarValue("E"); double val4 = calculation->GetInputScalarValue("L"); double val5 = calculation->GetInputScalarValue("C"); std::vector<NXOpen::NXString> names; calculation->GetResultLoadCaseNames(names); int nlc = names.size(); std::vector<double> values; double allowable; allowable = calculation->GetResultOutputScalarValue("sigmacr", failuremode, ""); for (int i = 0; i < nlc; ++i) { values.push_back(calculation->GetResultMsValue(failuremode , names[0])); } return true;}
Learn more
Custom methods
Custom method example
Creating tables and groups
Interfacing with external files
Diagrams for custom methods
Specifying default values for parameters
Bulk processing of calculations
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
Interfacing with external post-processors, 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/xid1697197 · retrieved 2026-07-17