NX Open C++ Reference Guide
Public Types | Public Member Functions
NXOpen::Update Class Reference

Provides methods for update and delete. More...

List of all members.

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::ErrorListErrorList ()
 Returns the list of all the errors that the Update module has encountered since the last time that the list was cleared.
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.
void LogForUpdate (NXOpen::NXObject *object)
 Log Object for Update
Created in NX7.5.3.
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 SetInterpartDelay (bool delayed)
 Sets the state of the interpart delay flag.
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.

Detailed Description

Provides methods for update and delete.


To obtain an instance of this class, refer to 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 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 Update::DoUpdate method.
Note: if you are removing objects from a sketch, 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 Update::ErrorList
Created in NX3.0.0.

License requirements : None
Parameters:
objectsThe objects to be deleted

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.

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 Update::ErrorList
Created in NX3.0.0.

License requirements : None
Parameters:
objectThe object to be deleted

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

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

Clears the error list.

See Update::ErrorList
Created in NX3.0.0.

License requirements : None

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.

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.

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

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

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

Clear the update mark.SeeUpdate::StartLocalUpdate .


Created in NX7.5.1.

License requirements : None

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

Returns the global delete list.

Returns:

Created in NX3.0.0.

License requirements : None

Get the current update lock status.

Also see Update::SetUpdateLock

Returns:
The lock state
Created in NX7.5.5.

License requirements : None

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

Log Object for Update
Created in NX7.5.3.



License requirements : None

Parameters:
objectThe object to be updated
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

Remove update failure action.


Created in NX7.5.0.

License requirements : None

Parameters:
objectThe object that fails to update

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::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.

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

Parameters:
lockThe lock state

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.

Undelay an Object
Created in NX7.5.3.



License requirements : None

Parameters:
objectThe object to be undelayed

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