PartCollection Class

class NXOpen.PartCollection

Bases: object

Represents the collection of all parts in a session.

Several methods including NXOpen.PartCollection.NewDisplay, NXOpen.PartCollection.OpenDisplay and NXOpen.BasePart.SaveAs can take part names in NX Manager command-line format while running in NX Manager mode. This format is as follows:

<code> Master Part: <ja_lt>@<ja_gt>DB/part-number/revision <ja_lt>@<ja_gt>DB/part-number/revision/master <ja_lt>@<ja_gt>DB/part-number/revision/master <ja_lt>@<ja_gt>DB/part-number/revision/master/version Non-Master Part: <ja_lt>@<ja_gt>DB/part-number/revision/type/name <ja_lt>@<ja_gt>DB/part-number/revision/type/name/version </code>

The separator character (‘/’) may be any character not used in the part-number, revision or type fields. It is inferred as the first character after the “<ja_lt>@<ja_gt>DB” prefix.

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

New in version NX3.0.0.

Properties

Property Description
BaseDisplay Returns the current display part of the session.
BaseWork Returns the current work part of the session.
Display Returns the current display part of the session.
Work Returns the current work part of the session.
WorkComponent Returns the work component.

Methods

Method Description
AddPartClosedHandler Registers a user defined method that is called whenever a part is in the process of being closed @return identifier of registered method (used to unregister the method)
AddPartCreatedHandler Registers a user defined method that is called whenever a new part is created @return identifier of registered method (used to unregister the method)
AddPartModifiedHandler Registers a user defined method that is called whenever a part is modified @return identifier of registered method (used to unregister the method)
AddPartOpenedHandler Registers a user defined method that is called whenever a part is opened @return identifier of registered method (used to unregister the method)
AddPartRenamedHandler Registers a user defined method that is called whenever a part is renamed @return identifier of registered method (used to unregister the method)
AddPartSavedAsHandler Registers a user defined method that is called whenever a part is saved as a specified name @return identifier of registered method (used to unregister the method)
AddPartSavedHandler Registers a user defined method that is called whenever a part is saved @return identifier of registered method (used to unregister the method)
AddWorkPartChangedHandler Registers a method that is called whenever the work part changes @return identifier of registered method (used to unregister the method)
CloseAll Closes all the parts open in the session.
CreateLinkedMirrorPartBuilder Creates a NXOpen.LinkedMirrorPartBuilder @return the LinkedMirrorPartBuilder object
FileNew Creates a NXOpen.FileNew @return
FindObject Finds the NXOpen.BasePart with the given name.
ForceSaveAll Saves all modified parts in a session.
GetMirrorCsysOptionOfMirrorPart Get the type of mirror coordinate system for the given linked mirrored part @return
GetMirrorPartType Get the type of linked mirrored part @return
GetMirrorPlaneDataOfMirrorPart Get the origin point and the normal direction of the mirror plane for the given linked mirrored part
GetSourcePartNameOfMirrorPart Get source part name of mirror part @return
ImportToolDesignPackage Import tool design package @return Top level assembly
IsExactMirroredPart Check whether given part is an exact linked mirrored part @return
IsMirroredPart Check whether given part is a linked mirrored part @return
NewBaseDisplay Creates a new part and sets this part as the display part.
NewDisplay Creates a new .prt part and sets this part as the display part.
NewPartCloseResponses Constructs a new PartCloseResponses class.
Open Opens an existing .prt part, but does not set it to be the displayed part.
OpenBase Opens an existing part, but does not set it to be the displayed part.
OpenBaseDisplay Opens an existing part and sets this part as the display part.
OpenDisplay Opens an existing .prt part and sets this part as the display part.
OpenSeedPartBlankTemplate Open unpopulated dataset with blank template
RemovePartClosedHandler Unregisters a user defined method that is called whenever a part is in the process of being closed
RemovePartCreatedHandler Unregisters a user defined method that is called whenever a new part is created
RemovePartModifiedHandler Unregisters a user defined method that is called whenever a part is modified
RemovePartOpenedHandler Unregisters a user defined method that is called whenever a part is opened
RemovePartRenamedHandler Unregisters a user defined method that is called whenever a part is renamed
RemovePartSavedAsHandler Unregisters a user defined method that is called whenever a part is saved as a specified name
RemovePartSavedHandler Unregisters a user defined method that is called whenever a part is saved
RemovePassword Remove password of the part.
RemoveWorkPartChangedHandler Unregisters a method that is called whenever the work part changes.
ReopenAll Reopens all modified parts in the session.
SaveAll Saves all modified parts in a session.
SetDisplay Sets the displayed part.
SetMirrorPartType Set the type of linked mirrored part
SetNonmasterSeedPartData Set non master seed part data for opening unpopulated non master part
SetOpenPassword Input password to the current session.
SetPassword Set password to the part.
SetSeedPartTemplateData Specify template data to open seed part or empty item revision
SetWork Sets the current work part.
SetWorkComponent Sets the work component.
SetWorkComponentOverride Sets the component with override part as the work component.
SolveAllPostponedConstraints Solves all the constraints, that have been postponed in their arrangement, in every loaded part in the session.

Enumerations

PartCollectionRefsetOption Enumeration Controls the reference set used when setting the work component.
PartCollectionSdpsStatus Enumeration
Indicates the reason why it was not possible to use Design in Context (i.e. to set the work part to a component of the displayed part.)
PartCollectionWorkComponentOption Enumeration Controls the behavior when setting the work component.

Property Detail

BaseDisplay

PartCollection.BaseDisplay

Returns the current display part of the session.

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

Getter Method

Signature BaseDisplay()

Returns:
Return type:NXOpen.BasePart

New in version NX4.0.0.

License requirements: None.

BaseWork

PartCollection.BaseWork

Returns the current work part of the session.

This is either the displayed part, or a part represented by a component in the displayed part’s NXOpen.Assemblies.ComponentAssembly. See: NXOpen.PartCollection.WorkComponent

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

Getter Method

Signature BaseWork()

Returns:
Return type:NXOpen.BasePart

New in version NX4.0.0.

License requirements: None.

Display

PartCollection.Display

Returns the current display part of the session.

An error will be thrown if the display part is not a .prt part.

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

Getter Method

Signature Display()

Returns:
Return type:NXOpen.Part

New in version NX3.0.0.

License requirements: None.

Work

PartCollection.Work

Returns the current work part of the session.

This is either the displayed part, or a part represented by a component in the displayed part’s NXOpen.Assemblies.ComponentAssembly. See: NXOpen.PartCollection.WorkComponent

An error will be thrown if the work part is not a .prt part.

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

Getter Method

Signature Work()

Returns:
Return type:NXOpen.Part

New in version NX3.0.0.

License requirements: None.

WorkComponent

PartCollection.WorkComponent

Returns the work component.

This is the component in the displayed part’s NXOpen.Assemblies.ComponentAssembly which represents the current work part. Note that there may be several different components which represent the same work part. In this case, one of them will be selected as the work component, while the others will be greyed out on the main display.

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

Getter Method

Signature WorkComponent()

Returns:The work component.
Return type:NXOpen.Assemblies.Component

New in version NX3.0.0.

License requirements: None.

Method Detail

AddPartClosedHandler

PartCollection.AddPartClosedHandler

Registers a user defined method that is called whenever a part is in the process of being closed

Signature AddPartClosedHandler(handler)

Parameters:handler (CallableObject) – method to register
Returns:identifier of registered method (used to unregister the method)
Return type:int

New in version NX6.0.0.

License requirements: None.

AddPartCreatedHandler

PartCollection.AddPartCreatedHandler

Registers a user defined method that is called whenever a new part is created

Signature AddPartCreatedHandler(handler)

Parameters:handler (CallableObject) – method to register
Returns:identifier of registered method (used to unregister the method)
Return type:int

New in version NX6.0.0.

License requirements: None.

AddPartModifiedHandler

PartCollection.AddPartModifiedHandler

Registers a user defined method that is called whenever a part is modified

Signature AddPartModifiedHandler(handler)

Parameters:handler (CallableObject) – method to register
Returns:identifier of registered method (used to unregister the method)
Return type:int

New in version NX6.0.0.

License requirements: None.

AddPartOpenedHandler

PartCollection.AddPartOpenedHandler

Registers a user defined method that is called whenever a part is opened

Signature AddPartOpenedHandler(handler)

Parameters:handler (CallableObject) – method to register
Returns:identifier of registered method (used to unregister the method)
Return type:int

New in version NX6.0.0.

License requirements: None.

AddPartRenamedHandler

PartCollection.AddPartRenamedHandler

Registers a user defined method that is called whenever a part is renamed

Signature AddPartRenamedHandler(handler)

Parameters:handler (CallableObject) – method to register
Returns:identifier of registered method (used to unregister the method)
Return type:int

New in version NX6.0.0.

License requirements: None.

AddPartSavedAsHandler

PartCollection.AddPartSavedAsHandler

Registers a user defined method that is called whenever a part is saved as a specified name

Signature AddPartSavedAsHandler(handler)

Parameters:handler (CallableObject) – method to register
Returns:identifier of registered method (used to unregister the method)
Return type:int

New in version NX6.0.0.

License requirements: None.

AddPartSavedHandler

PartCollection.AddPartSavedHandler

Registers a user defined method that is called whenever a part is saved

Signature AddPartSavedHandler(handler)

Parameters:handler (CallableObject) – method to register
Returns:identifier of registered method (used to unregister the method)
Return type:int

New in version NX6.0.0.

License requirements: None.

AddWorkPartChangedHandler

PartCollection.AddWorkPartChangedHandler

Registers a method that is called whenever the work part changes

Signature AddWorkPartChangedHandler(handler)

Parameters:handler (CallableObject) – method to register
Returns:identifier of registered method (used to unregister the method)
Return type:int

New in version NX6.0.0.

License requirements: None.

CloseAll

PartCollection.CloseAll

Closes all the parts open in the session.

Signature CloseAll(closeModified, responses)

Parameters:

New in version NX3.0.0.

License requirements: None.

CreateLinkedMirrorPartBuilder

PartCollection.CreateLinkedMirrorPartBuilder

Creates a NXOpen.LinkedMirrorPartBuilder

Signature CreateLinkedMirrorPartBuilder(part)

Parameters:part (NXOpen.Part) –
Returns:the LinkedMirrorPartBuilder object
Return type:NXOpen.LinkedMirrorPartBuilder

New in version NX8.5.0.

License requirements: solid_modeling (“SOLIDS MODELING”)

FileNew

PartCollection.FileNew

Creates a NXOpen.FileNew

Signature FileNew()

Returns:
Return type:NXOpen.FileNew

New in version NX5.0.0.

License requirements: None.

FindObject

PartCollection.FindObject

Finds the NXOpen.BasePart with the given name.

The part must have been loaded in this session.

An exception will be thrown if no object can be found with the given name.

Signature FindObject(name)

Parameters:name (str) – The name of the NXOpen.BasePart. This may either be the full pathname of the leaf name.
Returns:The part with the given name.
Return type:NXOpen.BasePart

New in version NX3.0.0.

License requirements: None.

ForceSaveAll

PartCollection.ForceSaveAll

Saves all modified parts in a session.

Signature ForceSaveAll()

Returns:Parts that could not be saved and their associated errors.
Return type:NXOpen.PartSaveStatus

New in version NX6.0.0.

License requirements: None.

GetMirrorCsysOptionOfMirrorPart

PartCollection.GetMirrorCsysOptionOfMirrorPart

Get the type of mirror coordinate system for the given linked mirrored part

Signature GetMirrorCsysOptionOfMirrorPart(part)

Parameters:part (NXOpen.Part) – input linked mirror part. Error is raised if input is not a linked mirror part
Returns:
Return type:NXOpen.LinkedMirrorPartBuilderMirrorCsysOption

New in version NX8.5.1.

License requirements: solid_modeling (“SOLIDS MODELING”)

GetMirrorPartType

PartCollection.GetMirrorPartType

Get the type of linked mirrored part

Signature GetMirrorPartType(part)

Parameters:part (NXOpen.Part) – input part
Returns:
Return type:NXOpen.LinkedMirrorPartBuilderMirrorPartTypeOption

New in version NX8.5.0.

License requirements: solid_modeling (“SOLIDS MODELING”)

GetMirrorPlaneDataOfMirrorPart

PartCollection.GetMirrorPlaneDataOfMirrorPart

Get the origin point and the normal direction of the mirror plane for the given linked mirrored part

Signature GetMirrorPlaneDataOfMirrorPart(part)

Parameters:part (NXOpen.Part) – input linked mirror part. Error is raised if input is not a linked mirror part
Returns:a tuple
Return type:A tuple consisting of (mirrorPlaneOrigin, mirrorPlaneDirection). mirrorPlaneOrigin is a NXOpen.Point3d. mirror plane origin mirrorPlaneDirection is a NXOpen.Vector3d. mirror plane normal direction

New in version NX8.5.1.

License requirements: solid_modeling (“SOLIDS MODELING”)

GetSourcePartNameOfMirrorPart

PartCollection.GetSourcePartNameOfMirrorPart

Get source part name of mirror part

Signature GetSourcePartNameOfMirrorPart(mirrorPart)

Parameters:mirrorPart (NXOpen.Part) – input part
Returns:
Return type:str

New in version NX8.5.0.

License requirements: solid_modeling (“SOLIDS MODELING”)

ImportToolDesignPackage

PartCollection.ImportToolDesignPackage

Import tool design package

Signature ImportToolDesignPackage(filename, outputDirectory)

Parameters:
  • filename (str) – Tool design package NOTE: The full Unicode character set is not supported for this parameter.
  • outputDirectory (str) – Output directory NOTE: The full Unicode character set is not supported for this parameter.
Returns:

a tuple

Return type:

A tuple consisting of (part, loadStatus, saveStatus). part is a NXOpen.Part. Top level assembly loadStatus is a NXOpen.PartLoadStatus. Parts that could not be loaded and their associated errors. saveStatus is a NXOpen.PartSaveStatus. Parts that could not be saved and their associated errors.

New in version NX9.0.0.

License requirements: None.

IsExactMirroredPart

PartCollection.IsExactMirroredPart

Check whether given part is an exact linked mirrored part

Signature IsExactMirroredPart(part)

Parameters:part (NXOpen.Part) – input part
Returns:
Return type:bool

New in version NX8.5.0.

License requirements: solid_modeling (“SOLIDS MODELING”)

IsMirroredPart

PartCollection.IsMirroredPart

Check whether given part is a linked mirrored part

Signature IsMirroredPart(part)

Parameters:part (NXOpen.Part) – input part
Returns:
Return type:bool

New in version NX8.5.0.

License requirements: solid_modeling (“SOLIDS MODELING”)

NewBaseDisplay

PartCollection.NewBaseDisplay

Creates a new part and sets this part as the display part.

Signature NewBaseDisplay(name, units)

Parameters:
  • name (str) – Name of new part NOTE: The full Unicode character set is not supported for this parameter.
  • units (NXOpen.BasePartUnits) – Units of new part
Returns:

Newly created part

Return type:

NXOpen.BasePart

New in version NX4.0.0.

License requirements: None.

NewDisplay

PartCollection.NewDisplay

Creates a new .prt part and sets this part as the display part.

**Note:</b> This method should only be used to create new .prt parts. Use NXOpen.PartCollection.NewDisplay to create other types of parts other than .prt parts.

Signature NewDisplay(name, units)

Parameters:
  • name (str) – Name of new part NOTE: The full Unicode character set is not supported for this parameter.
  • units (NXOpen.PartUnits) – Units of new part
Returns:

Newly created part

Return type:

NXOpen.Part

New in version NX3.0.0.

License requirements: None.

NewPartCloseResponses

PartCollection.NewPartCloseResponses

Constructs a new PartCloseResponses class.

This class is used to communicate whether to close certain parts if they are modified during part close.

Signature NewPartCloseResponses()

Returns:
Return type:NXOpen.PartCloseResponses

New in version NX4.0.0.

License requirements: None.

Open

PartCollection.Open

Opens an existing .prt part, but does not set it to be the displayed part.

See OpenDisplay.

**Note:</b> This method should only be used to open .prt parts. Use NXOpen.PartCollection.OpenBase to open other types of parts other than .prt parts.

Signature Open(filename)

Parameters:filename (str) – NOTE: The full Unicode character set is not supported for this parameter.
Returns:a tuple
Return type:A tuple consisting of (part, loadStatus). part is a NXOpen.Part. loadStatus is a NXOpen.PartLoadStatus. Parts that could not be loaded and their associated errors.

New in version NX3.0.0.

License requirements: None.

OpenBase

PartCollection.OpenBase

Opens an existing part, but does not set it to be the displayed part.

See OpenBaseDisplay.

**Note:</b> This method can also be used to open bookmark files and parts other than .prt parts.

Signature OpenBase(filename)

Parameters:filename (str) – NOTE: The full Unicode character set is not supported for this parameter.
Returns:a tuple
Return type:A tuple consisting of (part, loadStatus). part is a NXOpen.BasePart. loadStatus is a NXOpen.PartLoadStatus. Parts that could not be loaded and their associated errors.

New in version NX4.0.0.

License requirements: None.

OpenBaseDisplay

PartCollection.OpenBaseDisplay

Opens an existing part and sets this part as the display part.

This method will load components in the following manner depending on how the NXOpen.LoadOptions.ComponentsToLoad property is set:

1) “All Components” (NXOpen.LoadOptionsLoadComponents.All) will load all components of the assembly.

2) “Last Used Component Set” (NXOpen.LoadOptionsLoadComponents.LastSet) will load the components in the last saved component set.

3) “No Components” (NXOpen.LoadOptionsLoadComponents.None), “Use Last Filter” (NXOpen.LoadOptionsLoadComponents.LastFilter) or “Specify Filter” (NXOpen.LoadOptionsLoadComponents.SpecifyFilter) will load none of the components of the assembly.

**Note:</b> This method can also be used to open bookmark files and parts other than .prt parts.

**Note:</b> If this method is used in batch mode for a bookmark file which had been created using any of these options: BasePartBookmarkOption.AllPlusDisplay BasePartBookmarkOption.ComponentGroupsLoadOptionsPlusDisplay BasePartBookmarkOption.ComponentGroupsOnlyPlusDisplay BasePartBookmarkOption.DisplayOnly the display data in the bookmark file will not be applied to the displayed part.

Signature OpenBaseDisplay(filename)

Parameters:filename (str) – NOTE: The full Unicode character set is not supported for this parameter.
Returns:a tuple
Return type:A tuple consisting of (part, loadStatus). part is a NXOpen.BasePart. loadStatus is a NXOpen.PartLoadStatus. Parts that could not be loaded and their associated errors.

New in version NX4.0.0.

License requirements: None.

OpenDisplay

PartCollection.OpenDisplay

Opens an existing .prt part and sets this part as the display part.

**Note:</b> This method should only be used to open .prt parts. Use NXOpen.PartCollection.OpenBaseDisplay to open other types of parts other than .prt parts.

This method will load components in the following manner depending on how the NXOpen.LoadOptions.ComponentsToLoad property is set:

1) “All Components” (NXOpen.LoadOptionsLoadComponents.All) will load all components of the assembly.

2) “Last Used Component Set” (NXOpen.LoadOptionsLoadComponents.LastSet) will load the components in the last saved component set.

3) “No Components” (NXOpen.LoadOptionsLoadComponents.None), “Use Last Filter” (NXOpen.LoadOptionsLoadComponents.LastFilter) or “Specify Filter” (NXOpen.LoadOptionsLoadComponents.SpecifyFilter) will load none of the components of the assembly.

Signature OpenDisplay(filename)

Parameters:filename (str) – NOTE: The full Unicode character set is not supported for this parameter.
Returns:a tuple
Return type:A tuple consisting of (part, loadStatus). part is a NXOpen.Part. loadStatus is a NXOpen.PartLoadStatus. Parts that could not be loaded and their associated errors.

New in version NX3.0.0.

License requirements: None.

OpenSeedPartBlankTemplate

PartCollection.OpenSeedPartBlankTemplate

Open unpopulated dataset with blank template

Signature OpenSeedPartBlankTemplate(filename, addMaster)

Parameters:
  • filename (str) – Name of the part NOTE: The full Unicode character set is not supported for this parameter.
  • addMaster (bool) – whether to add master as component

New in version NX6.0.0.

License requirements: None.

RemovePartClosedHandler

PartCollection.RemovePartClosedHandler

Unregisters a user defined method that is called whenever a part is in the process of being closed

Signature RemovePartClosedHandler(id)

Parameters:id (int) – identifier for method to unregister

New in version NX6.0.0.

License requirements: None.

RemovePartCreatedHandler

PartCollection.RemovePartCreatedHandler

Unregisters a user defined method that is called whenever a new part is created

Signature RemovePartCreatedHandler(id)

Parameters:id (int) – identifier for method to unregister

New in version NX6.0.0.

License requirements: None.

RemovePartModifiedHandler

PartCollection.RemovePartModifiedHandler

Unregisters a user defined method that is called whenever a part is modified

Signature RemovePartModifiedHandler(id)

Parameters:id (int) – identifier for method to unregister

New in version NX6.0.0.

License requirements: None.

RemovePartOpenedHandler

PartCollection.RemovePartOpenedHandler

Unregisters a user defined method that is called whenever a part is opened

Signature RemovePartOpenedHandler(id)

Parameters:id (int) – identifier for method to unregister

New in version NX6.0.0.

License requirements: None.

RemovePartRenamedHandler

PartCollection.RemovePartRenamedHandler

Unregisters a user defined method that is called whenever a part is renamed

Signature RemovePartRenamedHandler(id)

Parameters:id (int) – identifier for method to unregister

New in version NX6.0.0.

License requirements: None.

RemovePartSavedAsHandler

PartCollection.RemovePartSavedAsHandler

Unregisters a user defined method that is called whenever a part is saved as a specified name

Signature RemovePartSavedAsHandler(id)

Parameters:id (int) – identifier for method to unregister

New in version NX6.0.0.

License requirements: None.

RemovePartSavedHandler

PartCollection.RemovePartSavedHandler

Unregisters a user defined method that is called whenever a part is saved

Signature RemovePartSavedHandler(id)

Parameters:id (int) – identifier for method to unregister

New in version NX6.0.0.

License requirements: None.

RemovePassword

PartCollection.RemovePassword

Remove password of the part.

This method should only be used with GC Toolkits.

Signature RemovePassword(part)

Parameters:part (NXOpen.Part) –

New in version NX8.5.0.

License requirements: None.

RemoveWorkPartChangedHandler

PartCollection.RemoveWorkPartChangedHandler

Unregisters a method that is called whenever the work part changes.

Do not create, open, save other parts or change display part inside this callback.

Signature RemoveWorkPartChangedHandler(id)

Parameters:id (int) – identifier for method to unregister

New in version NX6.0.0.

License requirements: None.

ReopenAll

PartCollection.ReopenAll

Reopens all modified parts in the session.

Signature ReopenAll(closeModified, responses)

Parameters:
Returns:

Report

containing results of reopen command :rtype: NXOpen.PartReopenReport

New in version NX4.0.0.

License requirements: None.

SaveAll

PartCollection.SaveAll

Saves all modified parts in a session.

Signature SaveAll()

Returns:a tuple
Return type:A tuple consisting of (anyPartsModified, saveStatus). anyPartsModified is a bool. Indicates whether any parts in the session were actually modified before the save operation was called. If false, then no parts were modified and, thus, a save was not attempted on any of the parts. saveStatus is a NXOpen.PartSaveStatus. Parts that could not be saved and their associated errors.

New in version NX3.0.0.

License requirements: None.

SetDisplay

PartCollection.SetDisplay

Sets the displayed part.

Signature SetDisplay(part, maintainWorkPart, setEntirePart)

Parameters:
  • part (NXOpen.BasePart) – The new displayed part
  • maintainWorkPart (bool) – If true, and if the current work part is a component of the new displayed part, then the work part remains unchanged. Otherwise the work part is set to the new displayed part.
  • setEntirePart (bool) – If true, and if maintain_work_part is true, the reference set of the work_component will be set to “Entire Part”. If false, it will be left unchanged. See NXOpen.Assemblies.ComponentAssembly.ReplaceReferenceSet
Returns:

a tuple

Return type:

A tuple consisting of (status, loadStatus). status is a NXOpen.PartCollectionSdpsStatus. Returns OK if the work part could be maintained, or a status code indicating the reason loadStatus is a NXOpen.PartLoadStatus. Any errors found when loading the new work part.

New in version NX3.0.0.

License requirements: None.

SetMirrorPartType

PartCollection.SetMirrorPartType

Set the type of linked mirrored part

Signature SetMirrorPartType(part, mirrorOption)

Parameters:

New in version NX8.5.0.

License requirements: solid_modeling (“SOLIDS MODELING”)

SetNonmasterSeedPartData

PartCollection.SetNonmasterSeedPartData

Set non master seed part data for opening unpopulated non master part

Signature SetNonmasterSeedPartData(filename)

Parameters:filename (str) – Name of the part NOTE: The full Unicode character set is not supported for this parameter.

New in version NX6.0.0.

License requirements: None.

SetOpenPassword

PartCollection.SetOpenPassword

Input password to the current session.

This method should only be used with GC Toolkits.

Signature SetOpenPassword(fileName, password)

Parameters:
  • fileName (str) –
  • password (str) – open password

New in version NX8.5.0.

License requirements: None.

SetPassword

PartCollection.SetPassword

Set password to the part.

This method should only be used with GC Toolkits.

Signature SetPassword(part, uAdminPassword, uReadPassword, uWritePassword, uFullControlPassword)

Parameters:
  • part (NXOpen.Part) –
  • uAdminPassword (str) – admin password
  • uReadPassword (str) – read password
  • uWritePassword (str) – write password
  • uFullControlPassword (str) – full control password

New in version NX8.5.0.

License requirements: None.

SetSeedPartTemplateData

PartCollection.SetSeedPartTemplateData

Specify template data to open seed part or empty item revision

Signature SetSeedPartTemplateData(filename, templateName, addMaster)

Parameters:
  • filename (str) – Name of the part NOTE: The full Unicode character set is not supported for this parameter.
  • templateName (str) – Name of the template NOTE: The full Unicode character set is not supported for this parameter.
  • addMaster (bool) – Whether master should be added as child

New in version NX6.0.0.

License requirements: None.

SetWork

PartCollection.SetWork

Sets the current work part.

The work component will be set to one of the visible components that represent this part in the current visible assembly. See SetWorkComponent. If no visible component is available, then an exception is thrown.

Signature SetWork(part)

Parameters:part (NXOpen.BasePart) – The new work part.

New in version NX3.0.0.

License requirements: None.

SetWorkComponent

PartCollection.SetWorkComponent

Overloaded method SetWorkComponent

  • SetWorkComponent(workComponent)
  • SetWorkComponent(workComponent, refsetOption, visibility)

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

Sets the work component. If the part represented by the new work component is not already the work part, then sets the work part appropriately. The new component’s reference set will be set to “Entire Part”.

Note that if the given work component is not visible, but an alternative component which represents the same part is visible, then the alternative component will be chosen as the new work component. If no visible component can be found, an exception is thrown

Signature SetWorkComponent(workComponent)

Parameters:workComponent (NXOpen.Assemblies.Component) – The new work component. This must be a component defined in the NXOpen.Assemblies.ComponentAssembly of the current displayed part. May be None, in which case the work part is reset to the displayed part.
Returns:Any errors found when loading the new work part.
Return type:NXOpen.PartLoadStatus

New in version NX3.0.0.

License requirements: None.

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

Sets the work component. If the part represented by the new work component is not already the work part, then sets the work part appropriately.

Signature SetWorkComponent(workComponent, refsetOption, visibility)

Parameters:
Returns:

Any errors found when loading the new work part.

Return type:

NXOpen.PartLoadStatus

New in version NX3.0.0.

License requirements: None.

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

SetWorkComponentOverride

PartCollection.SetWorkComponentOverride

Sets the component with override part as the work component.

Error is raised, if component doesn’t have override part.

Signature SetWorkComponentOverride(workComponent)

Parameters:workComponent (NXOpen.Assemblies.Component) – The new work component. This must be a component defined in the NXOpen.Assemblies.ComponentAssembly of the current displayed part.
Returns:Any errors found when loading the new work part.
Return type:NXOpen.PartLoadStatus

New in version NX10.0.0.

License requirements: None.

SolveAllPostponedConstraints

PartCollection.SolveAllPostponedConstraints

Solves all the constraints, that have been postponed in their arrangement, in every loaded part in the session.

This could lead to updating the model if required.

Signature SolveAllPostponedConstraints()

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)