NX Open C++ Reference Guide
|
Provides methods for update and delete. More...
Public Types | |
enum | FailureOption { FailureOptionNoOption, FailureOptionUndo, FailureOptionSuppress, FailureOptionSuppressAll, FailureOptionAccept, FailureOptionAcceptAll, FailureOptionDelete, FailureOptionDeleteDependents, FailureOptionInterrupt } |
Specifies the action to take when an object fails to update. More... | |
enum | Option { OptionNow, OptionLater } |
Specifies whether a method should perform an update or not. More... | |
Public Member Functions | |
int | AddObjectsToDeleteList (const std::vector< NXOpen::TaggedObject * > &objects) |
Adds objects to the global delete list. More... | |
int | AddToDeleteList (const std::vector< NXOpen::NXObject * > &objects) |
Adds objects to the global delete list. More... | |
int | AddToDeleteList (NXOpen::TaggedObject *object) |
Adds an object to the global delete list. More... | |
bool | AssemblyConstraintsDelay () |
Returns the state of the assembly constraints delay flag. More... | |
void | ClearDeleteList () |
Clears the contents of the global delete list. More... | |
void | ClearErrorList () |
Clears the update error list. More... | |
void | DoAssemblyConstraintsUpdate (NXOpen::Session::UndoMarkId undoMarkId) |
Performs an assembly constraints update. More... | |
void | DoAssemblyConstraintsUpdateInPart (NXOpen::Part *partTag, NXOpen::Session::UndoMarkId undoMarkId) |
Performs an assembly constraints update. More... | |
void | DoInterpartUpdate (NXOpen::Session::UndoMarkId undoMark) |
Performs an interpart update. More... | |
int | DoUpdate (NXOpen::Session::UndoMarkId undoMark) |
Updates the current session. More... | |
void | EndLocalUpdate () |
Ends the local update session, and clears the update mark for that session. More... | |
NXOpen::ErrorList * | ErrorList () |
Returns the list of all the errors that the Update module has encountered since the last time that the list was cleared. More... | |
NXOpen::Update::FailureOption | GetDefaultUpdateFailureAction () |
Gets the default action to take when an object fails to update. More... | |
std::vector< NXOpen::NXObject * > | GetDeleteList () |
Returns the global delete list. More... | |
std::vector < NXOpen::TaggedObject * > | GetObjectsOnDeleteList () |
Returns the objects on the global delete list. More... | |
bool | GetUpdateLock () |
Gets the update lock status. More... | |
bool | InterpartDelay () |
Returns the state of the interpart delay flag. More... | |
bool | IntrapartPartModuleDelay () |
Returns the delay status for intrapart part modules delays Created in NX9.0.0. More... | |
void | LogForUpdate (NXOpen::TaggedObject *objectToUpdate) |
Logs an object for update. More... | |
void | MakeUpToDate (const std::vector< NXOpen::NXObject * > &objects, NXOpen::Session::UndoMarkId undoMarkId) |
Updates all given out-of-date features or expressions to make them up to date Created in NX9.0.0. More... | |
bool | ProductInterfaceDelay () |
Returns the delay status for product interface delays Created in NX11.0.1. More... | |
void | RemoveFromDeleteList (const std::vector< NXOpen::NXObject * > &objects) |
Removes objects from the global delete list. More... | |
void | RemoveObjectsFromDeleteList (const std::vector< NXOpen::TaggedObject * > &objects) |
Removes objects from the global delete list. More... | |
void | RemoveUpdateFailureAction (NXOpen::TaggedObject *object) |
Removes the update failure action for an object. More... | |
void | SetAssemblyConstraintsDelay (bool delayed) |
Sets the state of the assembly constraints delay flag. More... | |
void | SetDefaultUpdateFailureAction (NXOpen::Update::FailureOption failureAction) |
Sets the default action to take when an object fails to update. More... | |
void | SetInterpartDelay (bool delayed) |
Sets the state of the interpart delay flag. More... | |
void | SetIntrapartPartModuleDelay (bool delayed) |
Sets the delay status for intrapart part modules delays Created in NX9.0.0. More... | |
void | SetProductInterfaceDelay (bool delayed) |
Sets the delay status for product interface delays Created in NX11.0.1. More... | |
void | SetPropagateDelete (bool propagateToDelete) |
Sets the propagate delete for update. More... | |
void | SetUpdateFailureAction (NXOpen::TaggedObject *object, NXOpen::Update::FailureOption failureAction) |
Sets the update failure action for an object. More... | |
void | SetUpdateLock (bool lock) |
Sets the update lock to lock and unlock updates. More... | |
void | StartLocalUpdate () |
Starts a local update session, and sets an update mark for that session. More... | |
tag_t | Tag () const |
Returns the tag of this object. More... | |
void | UndelayObjectUpdate (NXOpen::TaggedObject *objectToUpdate) |
Undelay an Object Created in NX7.5.3. More... | |
void | UpdateAllIntrapartPartModulesInPart (NXOpen::Part *partTag, NXOpen::Session::UndoMarkId undoMarkId) |
Updates all out-of-date intrapart part modules Created in NX9.0.0. More... | |
void | UpdateAllLinkedPartModulesInPart (NXOpen::Part *partTag, NXOpen::Session::UndoMarkId undoMarkId) |
Updates all linked part modules in the part Created in NX10.0.0. More... | |
void | UpdateAllProductInterfaceInPart (NXOpen::Part *partTag, NXOpen::Session::UndoMarkId undoMarkId) |
Updates all out-of-date product interfaces Created in NX11.0.1. More... | |
Provides methods for update and delete.
To obtain an instance of this class, refer to NXOpen::Session
Created in NX3.0.0.
Specifies the action to take when an object fails to update.
Created in NX7.5.0.
Specifies whether a method should perform an update or not.
Methods that choose not to perform an update will need to call NXOpen::Update::DoUpdate at a later time. Some methods in the Common API may perform an update. In an effort to improve performance, these methods take an option as input to not perform an update. For example, a method called in a loop may set the option to not update and then perform an explicit update after the loop completes.
Created in NX5.0.1.
Enumerator | |
---|---|
OptionNow |
Perform an update immediately. |
OptionLater |
Do not perform an update. |
int NXOpen::Update::AddObjectsToDeleteList | ( | const std::vector< NXOpen::TaggedObject * > & | objects | ) |
Adds objects to the global delete list.
The objects in the global delete list will be deleted when the next update is performed. An update can be performed through the NXOpen::Update::DoUpdate method.
Note: if you are removing objects from a sketch, NXOpen::Sketch::DeleteObjects should be used instead.
objects | The objects to be deleted |
int NXOpen::Update::AddToDeleteList | ( | const std::vector< NXOpen::NXObject * > & | objects | ) |
Adds objects to the global delete list.
The objects in the global delete list will be deleted when the next update is performed. An update can be performed through the NXOpen::Update::DoUpdate method.
Note: if you are removing objects from a sketch, NXOpen::Sketch::DeleteObjects should be used instead.
Created in NX3.0.0.
License requirements : None
objects | The objects to be deleted |
int NXOpen::Update::AddToDeleteList | ( | NXOpen::TaggedObject * | object | ) |
Adds an object to the global delete list.
The objects in the global delete list will be deleted when the next update is performed. An update can be performed through the NXOpen::Update::DoUpdate method.
Note: if you are removing objects from a sketch, NXOpen::Sketch::DeleteObjects should be used instead.
object | The object to be deleted |
bool NXOpen::Update::AssemblyConstraintsDelay | ( | ) |
Returns the state of the assembly constraints delay flag.
If true, then all the assembly constraints in the session will be delayed from update. If false, then updates will be applied across all parts in the session.
Created in NX7.5.0.
License requirements : None
void NXOpen::Update::ClearDeleteList | ( | ) |
Clears the contents of the global delete list.
Clearing the global delete list does not delete any of the objects on the list.
Created in NX3.0.0.
License requirements : None
void NXOpen::Update::ClearErrorList | ( | ) |
Clears the update error list.
See NXOpen::Update::ErrorList for more information about the update error list.
Created in NX3.0.0.
License requirements : None
void NXOpen::Update::DoAssemblyConstraintsUpdate | ( | NXOpen::Session::UndoMarkId | undoMarkId | ) |
Performs an assembly constraints update.
This ensures that all parts containing out-of-date assembly constraints in this session are updated.
Created in NX7.5.0.
License requirements : None
undoMarkId | If any update error occurs, the system will roll back to this undo mark. |
void NXOpen::Update::DoAssemblyConstraintsUpdateInPart | ( | NXOpen::Part * | partTag, |
NXOpen::Session::UndoMarkId | undoMarkId | ||
) |
Performs an assembly constraints update.
This ensures that the specified part containing out-of-date assembly constraints is updated.
Created in NX7.5.0.
License requirements : None
partTag | parttag |
undoMarkId | If any update error occurs, the system will roll back to this undo mark. |
void NXOpen::Update::DoInterpartUpdate | ( | NXOpen::Session::UndoMarkId | undoMark | ) |
Performs an interpart update.
This ensures that all parts in the session are updated with respect to any changes on other loaded parts. Note that this update will always occur regardless of the state of the interpart delay flag. See NXOpen::Update::InterpartDelay
Created in NX3.0.0.
License requirements : None
undoMark | If any update error occurs, the system will roll back to this undo mark. |
int NXOpen::Update::DoUpdate | ( | NXOpen::Session::UndoMarkId | undoMark | ) |
Updates the current session.
undoMark | If any update error occurs, the system will roll back to this undo mark and throw an exception. |
void NXOpen::Update::EndLocalUpdate | ( | ) |
Ends the local update session, and clears the update mark for that session.
See NXOpen::Update::StartLocalUpdate for details about the local update session.
Created in NX7.5.1.
License requirements : None
NXOpen::ErrorList* NXOpen::Update::ErrorList | ( | ) |
Returns the list of all the errors that the Update module has encountered since the last time that the list was cleared.
To clear the list, use NXOpen::Update::ClearErrorList .
Created in NX3.0.0.
License requirements : None
NXOpen::Update::FailureOption NXOpen::Update::GetDefaultUpdateFailureAction | ( | ) |
Gets the default action to take when an object fails to update.
An object will execute the default update failure action if it fails to update. The default update failure action is executed on a failing object even if there is a specific update action set for that object.
std::vector<NXOpen::NXObject *> NXOpen::Update::GetDeleteList | ( | ) |
Returns the global delete list.
Created in NX3.0.0.
License requirements : None
std::vector<NXOpen::TaggedObject *> NXOpen::Update::GetObjectsOnDeleteList | ( | ) |
Returns the objects on the global delete list.
bool NXOpen::Update::GetUpdateLock | ( | ) |
Gets the update lock status.
Also see NXOpen::Update::SetUpdateLock
bool NXOpen::Update::InterpartDelay | ( | ) |
Returns the state of the interpart delay flag.
If interpart delay is turned on, then updates will not be propagated beyond the work part. If off, then updates will be applied across all parts in the session.
Created in NX3.0.0.
License requirements : None
bool NXOpen::Update::IntrapartPartModuleDelay | ( | ) |
Returns the delay status for intrapart part modules delays
Created in NX9.0.0.
License requirements : None
void NXOpen::Update::LogForUpdate | ( | NXOpen::TaggedObject * | objectToUpdate | ) |
Logs an object for update.
Created in NX7.5.3.
License requirements : None
objectToUpdate | The object to be updated |
void NXOpen::Update::MakeUpToDate | ( | const std::vector< NXOpen::NXObject * > & | objects, |
NXOpen::Session::UndoMarkId | undoMarkId | ||
) |
Updates all given out-of-date features or expressions to make them up to date
Created in NX9.0.0.
License requirements : None
objects | The objects to be made up to date |
undoMarkId | If any update error occurs, the system will roll back to this undo mark. |
bool NXOpen::Update::ProductInterfaceDelay | ( | ) |
Returns the delay status for product interface delays
Created in NX11.0.1.
License requirements : None
void NXOpen::Update::RemoveFromDeleteList | ( | const std::vector< NXOpen::NXObject * > & | objects | ) |
Removes objects from the global delete list.
Note: if the object is not in the delete list, it will be ignored. An exception will not be raised.
Created in NX3.0.0.
License requirements : None
objects | The objects to be removed from the delete list |
void NXOpen::Update::RemoveObjectsFromDeleteList | ( | const std::vector< NXOpen::TaggedObject * > & | objects | ) |
Removes objects from the global delete list.
Note: if an object is not in the delete list, it will be ignored. An exception will not be raised.
Created in NX11.0.0.
License requirements : None
objects | The objects to be removed from the delete list |
void NXOpen::Update::RemoveUpdateFailureAction | ( | NXOpen::TaggedObject * | object | ) |
Removes the update failure action for an object.
Created in NX7.5.0.
License requirements : None
object | The object that fails to update |
void NXOpen::Update::SetAssemblyConstraintsDelay | ( | bool | delayed | ) |
Sets the state of the assembly constraints delay flag.
If true, then all the assembly constraints in the session will be delayed from update. If false, then updates will be applied across all parts in the session.
Created in NX7.5.0.
License requirements : None
delayed | The new state of the assembly constraints delay flag. |
void NXOpen::Update::SetDefaultUpdateFailureAction | ( | NXOpen::Update::FailureOption | failureAction | ) |
Sets the default action to take when an object fails to update.
An object will execute the default update failure action if it fails to update. The default update failure action is executed on a failing object even if there is a specific update action set for that object.
Created in NX9.0.0.
License requirements : None
failureAction | The default update failure action |
void NXOpen::Update::SetInterpartDelay | ( | bool | delayed | ) |
Sets the state of the interpart delay flag.
If interpart delay is turned on, then updates will not be propagated beyond the work part. If off, then updates will be applied across all parts in the session.
Created in NX3.0.0.
License requirements : None
delayed | The new state of the interpart delay flag. |
void NXOpen::Update::SetIntrapartPartModuleDelay | ( | bool | delayed | ) |
Sets the delay status for intrapart part modules delays
Created in NX9.0.0.
License requirements : None
delayed | The new state of the interpart delay flag. |
void NXOpen::Update::SetProductInterfaceDelay | ( | bool | delayed | ) |
Sets the delay status for product interface delays
Created in NX11.0.1.
License requirements : None
delayed | The new state of the product interface delay flag. |
void NXOpen::Update::SetPropagateDelete | ( | bool | propagateToDelete | ) |
Sets the propagate delete for update.
Created in NX12.0.0.
License requirements : None
propagateToDelete | propagatetodelete |
void NXOpen::Update::SetUpdateFailureAction | ( | NXOpen::TaggedObject * | object, |
NXOpen::Update::FailureOption | failureAction | ||
) |
Sets the update failure action for an object.
An object will execute this update failure action if it fails to update. If there is a default update failure action defined, that action overrides any specific update failure action set for an object.
Created in NX7.5.0.
License requirements : None
object | The object that fails to update |
failureAction | The update failure action |
void NXOpen::Update::SetUpdateLock | ( | bool | lock | ) |
Sets the update lock to lock and unlock updates.
Locking updates will lock model updates until updates are unlocked. Note that updates should be locked with utmost care as operations can produce undesired results or possibly result in unexpected failures when they are performed when updates are locked.
If you do choose to lock updates then you have to ensure that the update lock state prior to locking update is restored after your operation. See NXOpen::Update::GetUpdateLock to get the lock status. Additionally, a call to NXOpen::Update::DoUpdate has to be made after restoring the lock status to ensure that entities added to the update list after update was locked are updated.
Created in NX7.5.5.
License requirements : None
lock | The lock state |
void NXOpen::Update::StartLocalUpdate | ( | ) |
Starts a local update session, and sets an update mark for that session.
This ensures that only entities added into update list since the mark setting are updated when the next update is performed before the mark is cleared. To perform update,use NXOpen::Update::DoUpdate . To clear the mark, use NXOpen::Update::EndLocalUpdate .
Note:
Created in NX7.5.1.
License requirements : None
tag_t NXOpen::Update::Tag | ( | ) | const |
Returns the tag of this object.
void NXOpen::Update::UndelayObjectUpdate | ( | NXOpen::TaggedObject * | objectToUpdate | ) |
Undelay an Object
Created in NX7.5.3.
License requirements : None
objectToUpdate | The object to be undelayed |
void NXOpen::Update::UpdateAllIntrapartPartModulesInPart | ( | NXOpen::Part * | partTag, |
NXOpen::Session::UndoMarkId | undoMarkId | ||
) |
Updates all out-of-date intrapart part modules
Created in NX9.0.0.
License requirements : None
partTag | parttag |
undoMarkId | If any update error occurs, the system will roll back to this undo mark. |
void NXOpen::Update::UpdateAllLinkedPartModulesInPart | ( | NXOpen::Part * | partTag, |
NXOpen::Session::UndoMarkId | undoMarkId | ||
) |
Updates all linked part modules in the part
Created in NX10.0.0.
License requirements : usr_defined_features ("USER DEFINED FEATURES")
partTag | parttag |
undoMarkId | If any update error occurs, the system will roll back to this undo mark. |
void NXOpen::Update::UpdateAllProductInterfaceInPart | ( | NXOpen::Part * | partTag, |
NXOpen::Session::UndoMarkId | undoMarkId | ||
) |
Updates all out-of-date product interfaces
Created in NX11.0.1.
License requirements : None
partTag | parttag |
undoMarkId | If any update error occurs, the system will roll back to this undo mark. |