Margin of safety > Custom methods
Bulk processing of calculations
When you have many calculations that reference a custom method, you can process the calculations in bulk. In earlier versions of the software, you were limited to processing the calculations individually.
When the calculations reference multiple methods, and you specify bulk processing, the software groups the calculations according to method and then processes each group separately.
MultiEvaluate is the function that processes the calculations in bulk. For script method implementations, the MultiEvaluate function must be in the file for the custom method. For compiled method implementations, the MultiEvaluate function must be in the same DLL.
For large models that contain extremely large numbers of calculations, the ability to bulk process calculations can result in improved computational performance.
Visual Basic example
In this example, the code contains both a MultiEvaluate and an Evaluate method. When this occurs, the software to ignores the Evaluate method.
…Imports Author = NXOpen.CAE.AeroStructures.AuthorPublic Class MyVbMethod2 Public Function MultiEvaluate(ByRef multiCalculationContext As Author.MultiCalculationContext) Dim idx As integer = 0 DIM ccArray() As Author.CalculationContext multiCalculationContext.GetContextArray(ccArray) Dim nCalculations = ccArray.GetLength(0) For i As Integer = 0 To nCalculations-1 multiCalculationContext.SetSuccess(i, Evaluate(ccArray(i))) Next return True End Function Public Function Evaluate(ByRef calculationContext As Author.CalculationContext) ' Evaluate of a single context End FunctionEnd Class
C++ example
In this example, only the MultiEvaluate method is present.
extern "C" bool CaeSim_AeroStruct_Multi_Method2(Author::MultiCalculationContext *mContext){ if (mContext == nullptr) { return false; } std::vector<Author::CalculationContext *> contexts; mContext->GetContextArray(contexts); int i = 0; for (auto context : contexts) { mContext->SetSuccess(i++, CaeSim_AeroStruct_Method2(context)); } return true;}extern "C" bool CaeSim_AeroStruct_Method2(Author::CalculationContext *context){…
Learn more
Custom methods
Custom method example
Creating tables and groups
Interfacing with external files
Diagrams for custom methods
Specifying default values for parameters
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
Bulk processing of calculations, 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/xid1704347 · retrieved 2026-07-17