NX Open for CAE programming
Creating undo marks and forcing model updates
This section explains how to manage the model data from the application program. Undo processing and model updates are used to either roll back or lock in changes to the model made by your application. Although there is nothing unique about undo processing or model updates in NX Open for CAE applications, you need to understand these concepts to successfully create CAE applications.
Creating an undo mark
The undo function creates an undo mark. In the event of an error, you can revert to this undo mark.
The undo methods ensure that the session and parts are returned to a valid state. To use the undo methods, you first create an undo mark. This saves the current state of the software.
If the program executes without error, then you can call the method to delete the undo mark (unless the undo mark is visible and is being provided to let the user undo the operations of the custom application).
If the program encounters an error and needs to recover, you can revert to the undo mark.
Any undo mark that is created during the course of running a Block Styler application will be removed by the OK and Apply call backs, which impose their own undo mark encompassing the entire application.
For more information on undo marks, see the NX Open Programmers Guide → Handling Errors → Undo.
Forcing a model update
The Model Update function forces a model to update. Most NX Open methods that modify the internal data model perform a Model Update before they return to the calling application. A few methods are designed to be executed multiple times without Model Update. These methods require you to explicitly invoke a Model Update when the set of operations are complete. The NX Open API documentation lists which classes and methods require you to explicitly invoke the Model Update function.
Use the following command to invoke the Model Update function:
Python
theSession.UpdateManager.DoUpdate(undoMark)
VB.NET
theSession.UpdateManager.DoUpdate(undoMark As NXOpen.Session.UndoMarkID)
If the software encounters an error during the DoUpdate() method, the system will roll back to the undo mark specified in the call to the update manager.
For more information on the Model Update function, see the NX Open Programmers Guide → Other NX Operations → Model Update.
Learn more
NX Open for CAE terminology and concepts
CAD terminology and concepts
CAE terminology and concepts
The importance of the work part in CAE applications
Overview of the CAE data model
Working with objects in the CAE data model
Overview of the CAE solver languages
Working with the CAE solver languages: name strings
Working with the CAE solver languages: property tables
Look up more details
NX Open for CAE documentation resources
NX Open for CAE code examples
Quick links
Command reference
Pre/Post video examples
Bulk Entry Descriptions
Simcenter 3D tutorials
Browse Simcenter 3D help by product area
Creating undo marks and forcing model updates, 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/id1616272 · retrieved 2026-07-17