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 | AddToDeleteList (const std::vector< NXOpen::NXObject * > &objects) |
Adds objects to the global delete list. | |
int | AddToDeleteList (NXOpen::NXObject *object) |
Adds an object to the global delete list. | |
bool | AssemblyConstraintsDelay () |
Returns the state of the assembly constraints delay flag. | |
void | ClearDeleteList () |
Clears the contents of the global delete list. | |
void | ClearErrorList () |
Clears the error list. | |
void | DoAssemblyConstraintsUpdate (NXOpen::Session::UndoMarkId undoMarkId) |
Performs an assembly constraints update. | |
void | DoAssemblyConstraintsUpdateInPart (NXOpen::Part *partTag, NXOpen::Session::UndoMarkId undoMarkId) |
Performs an assembly constraints update. | |
void | DoInterpartUpdate (NXOpen::Session::UndoMarkId undoMark) |
Performs an interpart update. | |
int | DoUpdate (NXOpen::Session::UndoMarkId undoMark) |
Updates the current session. | |
void | EndLocalUpdate () |
Clear the update mark.SeeUpdate::StartLocalUpdate . | |
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. | |
NXOpen::Update::FailureOption | GetDefaultUpdateFailureAction () |
The default update failure action. | |
std::vector< NXOpen::NXObject * > | GetDeleteList () |
Returns the global delete list. | |
bool | GetUpdateLock () |
Get the current update lock status. | |
bool | InterpartDelay () |
Returns the state of the interpart delay flag. | |
bool | IntrapartPartModuleDelay () |
Returns the delay status for intrapart part modules delays Created in NX9.0.0. | |
void | LogForUpdate (NXOpen::NXObject *object) |
Log Object for Update Created in NX7.5.3. | |
void | MakeUpToDate (const std::vector< NXOpen::NXObject * > &objects, NXOpen::Session::UndoMarkId undoMarkId) |
Updates all given out-of-date features or expression to make them up to date Created in NX9.0.0. | |
void | RemoveFromDeleteList (const std::vector< NXOpen::NXObject * > &objects) |
Removes objects from the global delete list. | |
void | RemoveUpdateFailureAction (NXOpen::NXObject *object) |
Remove update failure action. | |
void | SetAssemblyConstraintsDelay (bool delayed) |
Sets the state of the assembly constraints delay flag. | |
void | SetDefaultUpdateFailureAction (NXOpen::Update::FailureOption failureAction) |
Action to take when an object fails to update even with specific action set to that object. | |
void | SetInterpartDelay (bool delayed) |
Sets the state of the interpart delay flag. | |
void | SetIntrapartPartModuleDelay (bool delayed) |
Sets the delay status for intrapart part modules delays Created in NX9.0.0. | |
void | SetUpdateFailureAction (NXOpen::NXObject *object, NXOpen::Update::FailureOption failureAction) |
Action to take when an object fails to update. | |
void | SetUpdateLock (bool lock) |
Lock and unlock updates. | |
void | StartLocalUpdate () |
Set an update mark. | |
tag_t | Tag () const |
Returns the tag of this object. | |
void | UndelayObjectUpdate (NXOpen::NXObject *object) |
Undelay an Object Created in NX7.5.3. | |
void | UpdateAllIntrapartPartModulesInPart (NXOpen::Part *partTag, NXOpen::Session::UndoMarkId undoMarkId) |
Updates all out-of-date intrapart part modules Created in NX9.0.0. | |
Provides methods for update and delete.
To obtain an instance of this class, refer to 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 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.
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 Update::DoUpdate method.
Note: if you are removing objects from a sketch, Sketch::DeleteObjects should be used instead.
objects | The objects to be deleted |
int NXOpen::Update::AddToDeleteList | ( | NXOpen::NXObject * | 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 Update::DoUpdate method.
Note: if you are removing objects from a sketch, 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.
(Does not delete any of the objects on the list.)
Created in NX3.0.0.
License requirements : None
void NXOpen::Update::ClearErrorList | ( | ) |
Clears the error list.
See Update::ErrorList
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 Update::SetInterpartDelay
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 | ( | ) |
Clear the update mark.SeeUpdate::StartLocalUpdate .
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 Update::ClearErrorList .
Created in NX3.0.0.
License requirements : None
NXOpen::Update::FailureOption NXOpen::Update::GetDefaultUpdateFailureAction | ( | ) |
The default update failure action.
An object will take that action if it fails to update even with specific action set to that object.
std::vector<NXOpen::NXObject *> NXOpen::Update::GetDeleteList | ( | ) |
Returns the global delete list.
bool NXOpen::Update::GetUpdateLock | ( | ) |
Get the current update lock status.
Also see 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::NXObject * | object | ) |
Log Object for Update
Created in NX7.5.3.
License requirements : None
object | 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 expression 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. |
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::RemoveUpdateFailureAction | ( | NXOpen::NXObject * | object | ) |
Remove update failure action.
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 | ) |
Action to take when an object fails to update even with specific action set to 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::SetUpdateFailureAction | ( | NXOpen::NXObject * | object, |
NXOpen::Update::FailureOption | failureAction | ||
) |
Action to take when an object fails to update.
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 | ) |
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 Update::GetUpdateLock to get the lock status. Additionally, a call to 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 | ( | ) |
Set an update mark.
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 Update::DoUpdate . To clear the mark, use Update::EndLocalUpdate .
Note: [1] Any entities updated while the mark was in place will not be updated during the next update even if they depend on entities on the newly restored list. [2] Local update may not be nested.i.e.if a local update process is started and not yet ended, you cannot start another one.
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::NXObject * | object | ) |
Undelay an Object
Created in NX7.5.3.
License requirements : None
object | 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. |