Update Class

class NXOpen.Update

Bases: object

Provides methods for update and delete.

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

New in version NX3.0.0.

Properties

Property Description
AssemblyConstraintsDelay Returns or sets the state of the assembly constraints delay flag.
ErrorList Returns the list of all the errors that the Update module has encountered since the last time that the list was cleared.
InterpartDelay Returns or sets the state of the interpart delay flag.
IntrapartPartModuleDelay Returns or sets the delay status for intrapart part modules delays

Methods

Method Description
AddObjectsToDeleteList Adds objects to the global delete list.
AddToDeleteList Adds objects to the global delete list.
ClearDeleteList Clears the contents of the global delete list.
ClearErrorList Clears the error list.
DoAssemblyConstraintsUpdate Performs an assembly constraints update.
DoAssemblyConstraintsUpdateInPart Performs an assembly constraints update.
DoInterpartUpdate Performs an interpart update.
DoUpdate Updates the current session @return The number of errors in the update module’s error list.
EndLocalUpdate Clear the update mark.
GetDefaultUpdateFailureAction The default update failure action.
GetDeleteList Returns the global delete list @return
GetObjectsOnDeleteList Returns the global delete list @return
GetUpdateLock Get the current update lock status.
LogForUpdate Log Object for Update
MakeUpToDate Updates all given out-of-date features or expression to make them up to date
RemoveFromDeleteList Removes objects from the global delete list.
RemoveObjectsFromDeleteList Removes objects from the global delete list.
RemoveUpdateFailureAction Remove update failure action.
SetDefaultUpdateFailureAction Action to take when an object fails to update even with specific action set to that object.
SetUpdateFailureAction Action to take when an object fails to update.
SetUpdateLock Lock and unlock updates.
StartLocalUpdate Set an update mark.
UndelayObjectUpdate Undelay an Object
UpdateAllIntrapartPartModulesInPart Updates all out-of-date intrapart part modules
UpdateAllLinkedPartModulesInPart Updates all linked part modules in the part

Enumerations

UpdateFailureOption Enumeration Specifies the action to take when an object fails to update.
UpdateOption Enumeration Specifies whether a method should perform an update or not.

Property Detail

AssemblyConstraintsDelay

Update.AssemblyConstraintsDelay

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

-------------------------------------

Getter Method

Signature AssemblyConstraintsDelay()

Returns:The current state of the assembly constraints delay flag.
Return type:bool

New in version NX7.5.0.

License requirements: None.

-------------------------------------

Setter Method

Signature AssemblyConstraintsDelay(delayed)

Parameters:delayed (bool) – The new state of the assembly constraints delay flag.

New in version NX7.5.0.

License requirements: None.

ErrorList

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

-------------------------------------

Getter Method

Signature ErrorList()

Returns:
Return type:NXOpen.ErrorList

New in version NX3.0.0.

License requirements: None.

InterpartDelay

Update.InterpartDelay

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

-------------------------------------

Getter Method

Signature InterpartDelay()

Returns:The current state of the interpart delay flag.
Return type:bool

New in version NX3.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature InterpartDelay(delayed)

Parameters:delayed (bool) – The new state of the interpart delay flag.

New in version NX3.0.0.

License requirements: None.

IntrapartPartModuleDelay

Update.IntrapartPartModuleDelay

Returns or sets the delay status for intrapart part modules delays

-------------------------------------

Getter Method

Signature IntrapartPartModuleDelay()

Returns:The current state of the intra part delay flag.
Return type:bool

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature IntrapartPartModuleDelay(delayed)

Parameters:delayed (bool) – The new state of the interpart delay flag.

New in version NX9.0.0.

License requirements: None.

Method Detail

AddObjectsToDeleteList

Update.AddObjectsToDeleteList

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.

Signature AddObjectsToDeleteList(objects)

Parameters:objects (list of NXOpen.TaggedObject) – The objects to be deleted
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() :rtype: int

New in version NX11.0.0.

License requirements: None.

AddToDeleteList

Update.AddToDeleteList

Overloaded method AddToDeleteList

  • AddToDeleteList(objects)
  • AddToDeleteList(object)

-------------------------------------

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.

Signature AddToDeleteList(objects)

Parameters:objects (list of NXOpen.NXObject) – The objects to be deleted
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() :rtype: int

New in version NX3.0.0.

License requirements: None.

-------------------------------------

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.

Signature AddToDeleteList(object)

Parameters:object (NXOpen.TaggedObject) – The object to be deleted
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() :rtype: int

New in version NX3.0.0.

License requirements: None.

-------------------------------------

ClearDeleteList

Update.ClearDeleteList

Clears the contents of the global delete list.

(Does not delete any of the objects on the list.)

Signature ClearDeleteList()

New in version NX3.0.0.

License requirements: None.

ClearErrorList

Update.ClearErrorList

Clears the error list.

See NXOpen.Update.ErrorList()

Signature ClearErrorList()

New in version NX3.0.0.

License requirements: None.

DoAssemblyConstraintsUpdate

Update.DoAssemblyConstraintsUpdate

Performs an assembly constraints update.

This ensures that all parts containing out-of-date assembly constraints in this session are updated.

Signature DoAssemblyConstraintsUpdate(undoMarkId)

Parameters:undoMarkId (int) – If any update error occurs, the system will roll back to this undo mark.

New in version NX7.5.0.

License requirements: None.

DoAssemblyConstraintsUpdateInPart

Update.DoAssemblyConstraintsUpdateInPart

Performs an assembly constraints update.

This ensures that the specified part containing out-of-date assembly constraints is updated.

Signature DoAssemblyConstraintsUpdateInPart(partTag, undoMarkId)

Parameters:
  • partTag (NXOpen.Part) –
  • undoMarkId (int) – If any update error occurs, the system will roll back to this undo mark.

New in version NX7.5.0.

License requirements: None.

DoInterpartUpdate

Update.DoInterpartUpdate

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

Signature DoInterpartUpdate(undoMark)

Parameters:undoMark (int) – If any update error occurs, the system will roll back to this undo mark.

New in version NX3.0.0.

License requirements: None.

DoUpdate

Update.DoUpdate

Updates the current session

Signature DoUpdate(undoMark)

Parameters:undoMark (int) – If any update error occurs, the system will roll back to this undo mark and throw an exception.
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() :rtype: int

New in version NX3.0.0.

License requirements: None.

EndLocalUpdate

Update.EndLocalUpdate

Clear the update mark.

See:py:meth:NXOpen.Update.StartLocalUpdate.

Signature EndLocalUpdate()

New in version NX7.5.1.

License requirements: None.

GetDefaultUpdateFailureAction

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.

Signature GetDefaultUpdateFailureAction()

Returns:The default update failure action
Return type:NXOpen.UpdateFailureOption

New in version NX9.0.0.

License requirements: None.

GetDeleteList

Update.GetDeleteList

Returns the global delete list

Signature GetDeleteList()

Returns:
Return type:list of NXOpen.NXObject

New in version NX3.0.0.

License requirements: None.

GetObjectsOnDeleteList

Update.GetObjectsOnDeleteList

Returns the global delete list

Signature GetObjectsOnDeleteList()

Returns:
Return type:list of NXOpen.TaggedObject

New in version NX11.0.0.

License requirements: None.

GetUpdateLock

Update.GetUpdateLock

Get the current update lock status.

Also see NXOpen.Update.SetUpdateLock()

Signature GetUpdateLock()

Returns:The lock state
Return type:bool

New in version NX7.5.5.

License requirements: None.

LogForUpdate

Update.LogForUpdate

Log Object for Update

Signature LogForUpdate(objectToUpdate)

Parameters:objectToUpdate (NXOpen.TaggedObject) – The object to be updated

New in version NX7.5.3.

License requirements: None.

MakeUpToDate

Update.MakeUpToDate

Updates all given out-of-date features or expression to make them up to date

Signature MakeUpToDate(objects, undoMarkId)

Parameters:
  • objects (list of NXOpen.NXObject) – The objects to be made up to date
  • undoMarkId (int) – If any update error occurs, the system will roll back to this undo mark.

New in version NX9.0.0.

License requirements: None.

RemoveFromDeleteList

Update.RemoveFromDeleteList

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.

Signature RemoveFromDeleteList(objects)

Parameters:objects (list of NXOpen.NXObject) – The objects to be removed from the delete list

New in version NX3.0.0.

License requirements: None.

RemoveObjectsFromDeleteList

Update.RemoveObjectsFromDeleteList

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.

Signature RemoveObjectsFromDeleteList(objects)

Parameters:objects (list of NXOpen.TaggedObject) – The objects to be removed from the delete list

New in version NX11.0.0.

License requirements: None.

RemoveUpdateFailureAction

Update.RemoveUpdateFailureAction

Remove update failure action.

Signature RemoveUpdateFailureAction(object)

Parameters:object (NXOpen.TaggedObject) – The object that fails to update

New in version NX7.5.0.

License requirements: None.

SetDefaultUpdateFailureAction

Update.SetDefaultUpdateFailureAction

Action to take when an object fails to update even with specific action set to that object.

Signature SetDefaultUpdateFailureAction(failureAction)

Parameters:failureAction (NXOpen.UpdateFailureOption) – The default update failure action

New in version NX9.0.0.

License requirements: None.

SetUpdateFailureAction

Update.SetUpdateFailureAction

Action to take when an object fails to update.

Signature SetUpdateFailureAction(object, failureAction)

Parameters:

New in version NX7.5.0.

License requirements: None.

SetUpdateLock

Update.SetUpdateLock

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.

Signature SetUpdateLock(lock)

Parameters:lock (bool) – The lock state

New in version NX7.5.5.

License requirements: None.

StartLocalUpdate

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.

Signature StartLocalUpdate()

New in version NX7.5.1.

License requirements: None.

UndelayObjectUpdate

Update.UndelayObjectUpdate

Undelay an Object

Signature UndelayObjectUpdate(objectToUpdate)

Parameters:objectToUpdate (NXOpen.TaggedObject) – The object to be undelayed

New in version NX7.5.3.

License requirements: None.

UpdateAllIntrapartPartModulesInPart

Update.UpdateAllIntrapartPartModulesInPart

Updates all out-of-date intrapart part modules

Signature UpdateAllIntrapartPartModulesInPart(partTag, undoMarkId)

Parameters:
  • partTag (NXOpen.Part) –
  • undoMarkId (int) – If any update error occurs, the system will roll back to this undo mark.

New in version NX9.0.0.

License requirements: None.

UpdateAllLinkedPartModulesInPart

Update.UpdateAllLinkedPartModulesInPart

Updates all linked part modules in the part

Signature UpdateAllLinkedPartModulesInPart(partTag, undoMarkId)

Parameters:
  • partTag (NXOpen.Part) –
  • undoMarkId (int) – If any update error occurs, the system will roll back to this undo mark.

New in version NX10.0.0.

License requirements: usr_defined_features (“USER DEFINED FEATURES”)