NX Open C++ Reference Guide
Public Types | Public Member Functions | List of all members
NXOpen::Update Class Reference

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. More...
 
int AddToDeleteList (NXOpen::NXObject *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 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 ()
 Clear the update mark.SeeNXOpen::Update::StartLocalUpdate . More...
 
NXOpen::ErrorListErrorList ()
 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 ()
 The default update failure action. More...
 
std::vector< NXOpen::NXObject * > GetDeleteList ()
 Returns the global delete list. More...
 
bool GetUpdateLock ()
 Get the current 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::NXObject *object)
 Log Object for Update
Created in NX7.5.3. More...
 
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. More...
 
void RemoveFromDeleteList (const std::vector< NXOpen::NXObject * > &objects)
 Removes objects from the global delete list. More...
 
void RemoveUpdateFailureAction (NXOpen::NXObject *object)
 Remove update failure action. More...
 
void SetAssemblyConstraintsDelay (bool delayed)
 Sets the state of the assembly constraints delay flag. More...
 
void SetDefaultUpdateFailureAction (NXOpen::Update::FailureOption failureAction)
 Action to take when an object fails to update even with specific action set to that object. 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 SetUpdateFailureAction (NXOpen::NXObject *object, NXOpen::Update::FailureOption failureAction)
 Action to take when an object fails to update. More...
 
void SetUpdateLock (bool lock)
 Lock and unlock updates. More...
 
void StartLocalUpdate ()
 Set an update mark. More...
 
tag_t Tag () const
 Returns the tag of this object. More...
 
void UndelayObjectUpdate (NXOpen::NXObject *object)
 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...
 

Detailed Description

Provides methods for update and delete.


To obtain an instance of this class, refer to NXOpen::Session

Created in NX3.0.0.

Member Enumeration Documentation

Specifies the action to take when an object fails to update.


Created in NX7.5.0.

Enumerator
FailureOptionNoOption 

No option.

FailureOptionUndo 

Perform undo.

FailureOptionSuppress 

Suppress failing object.

FailureOptionSuppressAll 

Suppress failing objects and subsequent objects.

FailureOptionAccept 

Accept failure of failing objects.

FailureOptionAcceptAll 

Accept failure of failing objects and subsequent objects.

FailureOptionDelete 

Delete failing object.

FailureOptionDeleteDependents 

Delete failing object and its dependents.

FailureOptionInterrupt 

Interrupt update upon failure.

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.

Member Function Documentation

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.

Returns
The number of errors in the update module's error list. If errors occurred during the execution of this method, they will be added to that error list. To obtain a list of these errors, use NXOpen::Update::ErrorList
Created in NX3.0.0.

License requirements : None
Parameters
objectsThe 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 NXOpen::Update::DoUpdate method.


Note: if you are removing objects from a sketch, NXOpen::Sketch::DeleteObjects should be used instead.

Returns
The number of errors in the update module's error list. If errors occurred during the execution of this method, they will be added to that error list. To obtain a list of these errors, use NXOpen::Update::ErrorList
Created in NX3.0.0.

License requirements : None
Parameters
objectThe 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 NXOpen::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

Parameters
undoMarkIdIf 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

Parameters
partTagparttag
undoMarkIdIf 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::SetInterpartDelay


Created in NX3.0.0.

License requirements : None

Parameters
undoMarkIf 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.

Returns
The number of errors in the update module's error list. If errors occurred during update they will be added to that error list. To obtain a list of these errors, use NXOpen::Update::ErrorList
Created in NX3.0.0.

License requirements : None
Parameters
undoMarkIf 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.SeeNXOpen::Update::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 NXOpen::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.

Returns
The default update failure action
Created in NX9.0.0.

License requirements : None
std::vector<NXOpen::NXObject *> NXOpen::Update::GetDeleteList ( )

Returns the global delete list.

Returns

Created in NX3.0.0.

License requirements : None
bool NXOpen::Update::GetUpdateLock ( )

Get the current update lock status.

Also see NXOpen::Update::SetUpdateLock

Returns
The lock state
Created in NX7.5.5.

License requirements : None
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

Parameters
objectThe 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

Parameters
objectsThe objects to be made up to date
undoMarkIdIf 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

Parameters
objectsThe 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

Parameters
objectThe 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

Parameters
delayedThe 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

Parameters
failureActionThe 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

Parameters
delayedThe 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

Parameters
delayedThe 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

Parameters
objectThe object that fails to update
failureActionThe 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 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

Parameters
lockThe 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 NXOpen::Update::DoUpdate . To clear the mark, use NXOpen::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

Parameters
objectThe 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

Parameters
partTagparttag
undoMarkIdIf 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 : None

Parameters
partTagparttag
undoMarkIdIf any update error occurs, the system will roll back to this undo mark.

The documentation for this class was generated from the following file:
Copyright 2012 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.