NX Open C++ Reference Guide
|
A Builder is an object that is used to create and edit other objects. More...
Public Member Functions | |
NXOpen::NXObject * | Commit () |
提交已应用于构建器的任何编辑. | |
void | Destroy () |
Deletes the builder, and cleans up any objects created by the builder. | |
std::vector< NXOpen::NXObject * > | GetCommittedObjects () |
For builders that create more than one object, this method returns the objects that are created by commit. | |
NXOpen::NXObject * | GetObject () |
Returns the object currently being edited by this builder. | |
void | ShowResults () |
Updates the model to reflect the result of an edit to the model for all builders that support showing results. | |
virtual bool | Validate () |
Validate whether the inputs to the component are sufficient for commit to be called. | |
![]() | |
tag_t | GetTag () const |
<b>Deprecated</b>:<br> Use Tag instead. | |
tag_t | Tag () const |
Returns the tag of this object. | |
A Builder is an object that is used to create and edit other objects.
This is an abstract class that provides the basic functionality common to all builders. See the Builder subclasses for details of application-specific builders.
All Builders use a transaction model. A new builder is created, and its methods are called to make changes. These changes are not applied to the session until the Builder::Commit method is invoked.
Once a Builder has been committed, it should be deleted using the Builder::Destroy . Alternatively, any edits made can be discarded by deleting the builder without calling commit.
This is an abstract class, and cannot be instantiated.
Created in NX4.0.0.
NXOpen::NXObject* NXOpen::Builder::Commit | ( | ) |
Commits any edits that have been applied to the builder.
Returns the object being edited, or a new object if the builder is being used in creation mode.
In certain cases this method may not return an object, please consult the particular class's documentation to see if this method has a different behavior.
void NXOpen::Builder::Destroy | ( | ) |
Deletes the builder, and cleans up any objects created by the builder.
This method should always be called when a builder
Created in NX4.0.0.
License requirements : None
std::vector<NXOpen::NXObject *> NXOpen::Builder::GetCommittedObjects | ( | ) |
For builders that create more than one object, this method returns the objects that are created by commit.
@return The objects created by Commit
Created in NX6.0.0.
License requirements : None
NXOpen::NXObject* NXOpen::Builder::GetObject | ( | ) |
Returns the object currently being edited by this builder.
If a new object is being created, and the builder has not yet been commited, returns NULL.
void NXOpen::Builder::ShowResults | ( | ) |
Updates the model to reflect the result of an edit to the model for all builders that support showing results.
Created in NX7.5.0.
License requirements : None
|
virtual |
Validate whether the inputs to the component are sufficient for commit to be called.
If the component is not in a state to commit then an exception is thrown. For example, if the component requires you to set some property, this method will throw an exception if you haven't set it. This method throws a not-yet-implemented NXException for some components.
Implements NXOpen::GeometricUtilities::IComponentBuilder.