ComponentAssembly Class

class NXOpen.Assemblies.ComponentAssembly

Bases: NXOpen.NXObject

Represents the set of :py:class:`NXOpen.Assemblies.Component`s that make up an assembly.

Components are arranged in a tree structure, with a single component at the root. (See NXOpen.Assemblies.ComponentAssembly.RootComponent.) The components directly below the root are added to this assembly by calling NXOpen.Assemblies.ComponentAssembly.AddComponent. These “Top Level” components are said to be owned directly by this assembly. Top Level components may themselves have subcomponents.

Certain methods in this class will only operate on Top Level components. For example, NXOpen.Assemblies.ComponentAssembly.MoveComponent will throw an exception if the input component is not owned directly by this assembly.

Note, however, that input components will be mapped onto the correct component in the assembly. See NXOpen.Assemblies.ComponentAssembly.MapComponentFromParent.

For any methods that specify a component’s position, the orientation matrix is in column order. The first column of the matrix specifies the X axis, the second the Y axis, and the third the Z axis.

To obtain an instance of this class, use NXOpen.BasePart.ComponentAssembly

New in version NX3.0.0.

Properties

Property Description
ActiveArrangement Returns or sets the currently active NXOpen.Assemblies.Arrangement for this ComponentAssembly
IsOccurrence Returns whether this object is an occurrence or not.
JournalIdentifier Returns the identifier that would be recorded in a journal for this object.
Name Returns the custom name of the object.
OwningComponent Returns the owning component, if this object is an occurrence.
OwningPart Returns the owning part of this object
Positioner Returns the component positioner for this assembly.
Prototype Returns the prototype of this object if it is an occurrence.
RootComponent
Returns the top-level component, i.e. the component at the root of the component tree.
Tag Returns the Tag for this object.

Methods

Method Description
AddComponent Creates a new NXOpen.Assemblies.Component in this assembly, based on an existing part file.
AddMasterPartComponent Creates a new NXOpen.Assemblies.Component in this assembly as master part.
AddPendingComponent Add a pending NXOpen.Assemblies.Component in this assembly.
ChangeByName Changes the current NXOpen.Assemblies.Arrangement of the given NXOpen.Assemblies.Component`s to the    :py:class:`NXOpen.Assemblies.Arrangement with the given name.
CheckinComponents Checks in array of components as per the option NXOpen.Assemblies.ComponentAssemblyCheckinCheckoutOption.
CheckinWorkset Checks in workset.
CheckoutAllModifiedObjects Checks out all modified objects in the current session.
CheckoutComponents Checks out array of components as per the option NXOpen.Assemblies.ComponentAssemblyCheckinCheckoutOption.
CheckoutWorkset Checks out workset.
CloseComponents Given an array of components, close the components.
ConvertRememberedMcs Converts all remembered mating constraints in the part of this assembly to remembered assembly constraints
CopyComponents Given an array of components, creates copies of the components such that each copy is created under the parent assembly of the original component.
CreateComponentPatternBuilder Creates a NXOpen.Assemblies.ComponentPatternBuilder object This can be used to create or edit a component pattern.
CreateConstraintGroupBuilder Creates a NXOpen.Positioning.ComponentConstraintGroupBuilder object.
CreateMatingConverter Creates a NXOpen.Positioning.MatingConverter object for this assembly.
DeleteAllAttributesByType Deletes all attributes of a specific type.
DeleteAttributeByTypeAndTitle Deletes an attribute by type and title.
DeleteMatingConditions Delete all the mating conditions in this assembly.
DeleteUserAttribute Deletes the first attribute encountered with the given Type, Title.
DeleteUserAttributes Deletes the attributes encountered with the given Type with option to update or not.
FindObject Finds the NXOpen.NXObject with the given identifier as recorded in a journal.
GetAsRequiredQuantity Gets the as-required quantity on this component.
GetAttributeTitlesByType Gets all the attribute titles of a specific type.
GetBooleanUserAttribute Gets a boolean attribute by Title and array Index.
GetCheckedoutStatusOfObjects Returns the checkedout status (checkedout/non checkedout) of all the objects open in NX.
GetComponentOrders Returns all :py:class:`NXOpen.Assemblies.ComponentOrder`s available in the part
GetComponentQuantityType Gets the quantity type of the components.
GetComputationalTimeUserAttribute Gets a time attribute by Title and array Index.
GetIntegerAttribute Gets an integer attribute by title.
GetIntegerQuantity Gets the value of the integer quantity of component.
GetIntegerUserAttribute Gets an integer attribute by Title and array Index.
GetNonGeometricState Gets the component state as Geometric or Non-Geometric.
GetRealAttribute Gets a real attribute by title.
GetRealQuantity Gets the value of real quantity and corresponding units on this component.
GetRealUserAttribute Gets a real attribute by Title and array Index.
GetReferenceAttribute Gets the reference string (not the calculated value) of a string attribute that uses a reference string.
GetStringAttribute Gets a string attribute value by title.
GetStringUserAttribute Gets a string attribute by Title and array Index.
GetSuppressedState Gets the suppression state of the component in its controlling arrangement @return The suppressed state
GetSuppressionExpression Gets the expression controlling the suppression of the component in its controlling arrangement @return The suppression expression.
GetTimeAttribute Gets a time attribute by title.
GetTimeUserAttribute Gets a time attribute by Title and array Index.
GetUserAttribute Gets the first attribute encountered on the object, if any, with a given Title, Type and array Index.
GetUserAttributeAsString Gets the first attribute encountered on the object, if any, with a given title, type and array index.
GetUserAttributeCount Gets the count of set attributes on the object, if any, of the given type.
GetUserAttributeLock Determine the lock of the given attribute.
GetUserAttributeSize Gets the size of the first attribute encountered on the object, if any, with a given Title and Type.
GetUserAttributeSourceObjects Returns an array of objects from which this object presents attributes.
GetUserAttributes Gets all the attributes that have been set on the given object.
GetUserAttributesAsStrings Gets all the attributes that have been set on the given object.
HasUserAttribute Determines if an attribute with the given Title, Type and array Index is present on the object Unset attributes will not be detected by this function, as its purpose is to test for the actual presence of the attribute on the object.
MapComponentFromParent Maps a component in a parent assembly onto a corresponding component in this assembly.
MapComponentsFromSubassembly Maps a component in a subassembly onto the corresponding components in this parent assembly.
MoveComponent Moves a component by specifying a translation and rotation.
OpenComponents Given an array of components, open the components using the open_option.
Print Prints a representation of this object to the system log file.
ReleaseSuppression Release control of the suppression state of an array of components.
RemoveComponent Removes a component from this assemebly.
ReorderChildrenOfParent Assigns a new order to immediate children NXOpen.Assemblies.Component`s of parent :py:class:`NXOpen.Assemblies.Component.
ReorderComponents Reorders the array of NXOpen.Assemblies.Component`s before or after the target :py:class:`NXOpen.Assemblies.Component.
ReplaceReferenceSet Replaces the reference set used by a component.
ReplaceReferenceSetInOwners Sets the reference set used to represent each component in an array.
RestructureComponents Given an array of components and a specified parent this function will transfer the given components to the parent.
SetAsRequiredQuantity Sets the as-required quantity on this component.
SetAttribute Creates or modifies an integer attribute.
SetBooleanUserAttribute Creates or modifies a boolean attribute with the option to update or not.
SetDefault Set the default NXOpen.Assemblies.Arrangement for the given NXOpen.Assemblies.ComponentAssembly.
SetEmptyRefset Convenience method for setting the reference set used to represent a component to be empty
SetEntirePartRefset Convenience method for setting the reference set used to represent a component to be the entire part.
SetIntegerQuantity Sets the integer quantity on this component.
SetName Sets the custom name of the object.
SetNonGeometricState Sets the component state to Geometric or Non-Geometric.
SetRealQuantity Sets the real quantity and corresponding units on this component.
SetReferenceAttribute Creates or modifies a string attribute which uses a reference string.
SetTimeAttribute Creates or modifies a time attribute.
SetTimeUserAttribute Creates or modifies a time attribute with the option to update or not.
SetUserAttribute Creates or modifies an attribute with the option to update or not.
SetUserAttributeLock Lock or unlock the given attribute.
SubstituteComponent Substitutes an old component with a new component.
SuppressComponents Suppresses an array of components @return list of errors encountered during the suppress
UnsuppressComponents Unsuppresses an array of components in this ComponentAssembly @return list of errors encountered during the unsuppress

Enumerations

ComponentAssemblyCheckinCheckoutOption Enumeration Check in and Check out options for components
ComponentAssemblyCloseModified Enumeration Indicates how close component should handle component parts when they are modified
ComponentAssemblyOpenComponentStatus Enumeration Open Component Status
ComponentAssemblyOpenOption Enumeration Open options for open_components
ComponentAssemblyOrderTargetLocation Enumeration Option controls whether reordered NXOpen.Assemblies.Component`s are placed         before or after the target :py:class:`NXOpen.Assemblies.Component
ComponentAssemblySubstitutionMode Enumeration Defines how a component substitution operation is performed.
ComponentAssemblySuppressedState Enumeration Defines the component supression states.

Property Detail

ActiveArrangement

ComponentAssembly.ActiveArrangement

Returns or sets the currently active NXOpen.Assemblies.Arrangement for this ComponentAssembly

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

Getter Method

Signature ActiveArrangement()

Returns:The NXOpen.Assemblies.Arrangement that is currently active
Return type:NXOpen.Assemblies.Arrangement

New in version NX3.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

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

Setter Method

Signature ActiveArrangement(newArrangement)

Parameters:newArrangement (NXOpen.Assemblies.Arrangement) – The new active NXOpen.Assemblies.Arrangement. This Arrangement must be defined in this ComponentAssembly.

New in version NX3.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

IsOccurrence

ComponentAssembly.IsOccurrence

Returns whether this object is an occurrence or not.

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

Getter Method

Signature IsOccurrence()

Returns:This object is an occurrence
Return type:bool

New in version NX3.0.0.

License requirements: None.

JournalIdentifier

ComponentAssembly.JournalIdentifier

Returns the identifier that would be recorded in a journal for this object.

This may not be the same across different releases of the software.

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

Getter Method

Signature JournalIdentifier()

Returns:
Return type:str

New in version NX3.0.0.

License requirements: None.

Name

ComponentAssembly.Name

Returns the custom name of the object.

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

Getter Method

Signature Name()

Returns:
Return type:str

New in version NX3.0.0.

License requirements: None.

OwningComponent

ComponentAssembly.OwningComponent

Returns the owning component, if this object is an occurrence.

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

Getter Method

Signature OwningComponent()

Returns:
Return type:NXOpen.Assemblies.Component

New in version NX3.0.0.

License requirements: None.

OwningPart

ComponentAssembly.OwningPart

Returns the owning part of this object

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

Getter Method

Signature OwningPart()

Returns:The owning part of this object or null if it does not have an owner
Return type:NXOpen.BasePart

New in version NX3.0.0.

License requirements: None.

Positioner

ComponentAssembly.Positioner

Returns the component positioner for this assembly.

The positioner manages the component constraints.

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

Getter Method

Signature Positioner()

Returns:
Return type:NXOpen.Positioning.ComponentPositioner

New in version NX4.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

Prototype

ComponentAssembly.Prototype

Returns the prototype of this object if it is an occurrence.

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

Getter Method

Signature Prototype()

Returns:The prototype of this object or null if this object is not an occurrence
Return type:NXOpen.INXObject

New in version NX3.0.0.

License requirements: None.

RootComponent

ComponentAssembly.RootComponent

Returns the top-level component, i.e. the component at the root of the component tree.

This component corresponds to the part that owns this NXOpen.Assemblies.ComponentAssembly. The components below this will correspond to parts added by calling NXOpen.Assemblies.ComponentAssembly.AddComponent.

Note that this will be None if there are no components in the tree. (I.e. if the part that owns this ComponentAssembly is a piece part.)

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

Getter Method

Signature RootComponent()

Returns:The NXOpen.Assemblies.Component at the root of this ComponentAssembly’s tree
Return type:NXOpen.Assemblies.Component

New in version NX3.0.0.

License requirements: None.

Method Detail

AddComponent

ComponentAssembly.AddComponent

Overloaded method AddComponent

  • AddComponent(partToAdd, referenceSetName, componentName, basePoint, orientation, layer)
  • AddComponent(partToAdd, referenceSetName, componentName, basePoint, orientation, layer, uomAsNgc)
  • AddComponent(partToAdd, referenceSetName, componentName, basePoint, orientation, layer)

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

Creates a new NXOpen.Assemblies.Component in this assembly, based on an existing part file.

Signature AddComponent(partToAdd, referenceSetName, componentName, basePoint, orientation, layer)

Parameters:
  • partToAdd (str) – The part that defines the new component NOTE: The full Unicode character set is not supported for this parameter.
  • referenceSetName (str) – The name of the reference set used to represent the new component NOTE: The full Unicode character set is not supported for this parameter.
  • componentName (str) – The name of the new component NOTE: The full Unicode character set is not supported for this parameter.
  • basePoint (NXOpen.Point3d) – Location of the new component
  • orientation (NXOpen.Matrix3x3) – Orientation matrix for the new component, in column order.
  • layer (int) – The layer to place the new component on -1 means use the original layers defined in the component. 0 means use the work layer. 1-256 means use the specified layer.
Returns:

a tuple

Return type:

A tuple consisting of (component, loadStatus). component is a NXOpen.Assemblies.Component. The new Component loadStatus is a NXOpen.PartLoadStatus. Result of loading the part_to_add

New in version NX3.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

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

Creates a new NXOpen.Assemblies.Component in this assembly, based on an existing part file.

Signature AddComponent(partToAdd, referenceSetName, componentName, basePoint, orientation, layer, uomAsNgc)

Parameters:
  • partToAdd (str) – The part that defines the new component NOTE: The full Unicode character set is not supported for this parameter.
  • referenceSetName (str) – The name of the reference set used to represent the new component NOTE: The full Unicode character set is not supported for this parameter.
  • componentName (str) – The name of the new component NOTE: The full Unicode character set is not supported for this parameter.
  • basePoint (NXOpen.Point3d) – Location of the new component
  • orientation (NXOpen.Matrix3x3) – Orientation matrix for the new component, in column order.
  • layer (int) – The layer to place the new component on -1 means use the original layers defined in the component. 0 means use the work layer. 1-256 means use the specified layer.
  • uomAsNgc (bool) – Whether to set to non-geometric if with unit-of-measure
Returns:

a tuple

Return type:

A tuple consisting of (component, loadStatus). component is a NXOpen.Assemblies.Component. The new Component loadStatus is a NXOpen.PartLoadStatus. Result of loading the part_to_add

New in version NX6.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

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

Creates a new NXOpen.Assemblies.Component in this assembly, based on an existing part file.

Signature AddComponent(partToAdd, referenceSetName, componentName, basePoint, orientation, layer)

Parameters:
  • partToAdd (NXOpen.BasePart) – The part that defines the new component
  • referenceSetName (str) – The name of the reference set used to represent the new component NOTE: The full Unicode character set is not supported for this parameter.
  • componentName (str) – The name of the new component NOTE: The full Unicode character set is not supported for this parameter.
  • basePoint (NXOpen.Point3d) – Location of the new component
  • orientation (NXOpen.Matrix3x3) – Orientation matrix for the new component, in column order.
  • layer (int) – The layer to place the new component on -1 means use the original layers defined in the component. 0 means use the work layer. 1-256 means use the specified layer.
Returns:

a tuple

Return type:

A tuple consisting of (component, loadStatus). component is a NXOpen.Assemblies.Component. The new Component loadStatus is a NXOpen.PartLoadStatus. Result of loading the part_to_add

New in version NX4.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

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

AddMasterPartComponent

ComponentAssembly.AddMasterPartComponent

Overloaded method AddMasterPartComponent

  • AddMasterPartComponent(partToAdd, referenceSetName, componentName, basePoint, orientation, layer)
  • AddMasterPartComponent(partToAdd, referenceSetName, componentName, basePoint, orientation, layer)

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

Creates a new NXOpen.Assemblies.Component in this assembly as master part.

Signature AddMasterPartComponent(partToAdd, referenceSetName, componentName, basePoint, orientation, layer)

Parameters:
  • partToAdd (str) – The part that defines the new component NOTE: The full Unicode character set is not supported for this parameter.
  • referenceSetName (str) – The name of the reference set used to represent the new component NOTE: The full Unicode character set is not supported for this parameter.
  • componentName (str) – The name of the new component NOTE: The full Unicode character set is not supported for this parameter.
  • basePoint (NXOpen.Point3d) – Location of the new component
  • orientation (NXOpen.Matrix3x3) – Orientation matrix for the new component, in column order.
  • layer (int) – The layer to place the new component on -1 means use the original layers defined in the component. 0 means use the work layer. 1-256 means use the specified layer.
Returns:

a tuple

Return type:

A tuple consisting of (component, loadStatus). component is a NXOpen.Assemblies.Component. The new Component loadStatus is a NXOpen.PartLoadStatus. Result of loading the part_to_add

New in version NX3.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

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

Creates a new NXOpen.Assemblies.Component in this assembly as master part.

Signature AddMasterPartComponent(partToAdd, referenceSetName, componentName, basePoint, orientation, layer)

Parameters:
  • partToAdd (NXOpen.Part) – The part that defines the new component
  • referenceSetName (str) – The name of the reference set used to represent the new component NOTE: The full Unicode character set is not supported for this parameter.
  • componentName (str) – The name of the new component NOTE: The full Unicode character set is not supported for this parameter.
  • basePoint (NXOpen.Point3d) – Location of the new component
  • orientation (NXOpen.Matrix3x3) – Orientation matrix for the new component, in column order.
  • layer (int) – The layer to place the new component on -1 means use the original layers defined in the component. 0 means use the work layer. 1-256 means use the specified layer.
Returns:

a tuple

Return type:

A tuple consisting of (component, loadStatus). component is a NXOpen.Assemblies.Component. The new Component loadStatus is a NXOpen.PartLoadStatus. Result of loading the part_to_add

New in version NX4.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

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

AddPendingComponent

ComponentAssembly.AddPendingComponent

Add a pending NXOpen.Assemblies.Component in this assembly.

Signature AddPendingComponent(partToAdd, pendingComponent, referenceSetName, componentName, basePoint, orientation, layer, uomAsNgc)

Parameters:
  • partToAdd (str) – The part that defines the new component NOTE: The full Unicode character set is not supported for this parameter.
  • pendingComponent (NXOpen.NXObject) – component to add
  • referenceSetName (str) – The name of the reference set used to represent the new component NOTE: The full Unicode character set is not supported for this parameter.
  • componentName (str) – The name of the new component NOTE: The full Unicode character set is not supported for this parameter.
  • basePoint (NXOpen.Point3d) – Location of the new component
  • orientation (NXOpen.Matrix3x3) – Orientation matrix for the new component, in column order.
  • layer (int) – The layer to place the new component on -1 means use the original layers defined in the component. 0 means use the work layer. 1-256 means use the specified layer.
  • uomAsNgc (bool) – Whether to set to non-geometric if with unit-of-measure
Returns:

Result of loading the

part_to_add :rtype: NXOpen.PartLoadStatus

New in version NX8.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

ChangeByName

ComponentAssembly.ChangeByName

Changes the current NXOpen.Assemblies.Arrangement of the given NXOpen.Assemblies.Component`s to the :py:class:`NXOpen.Assemblies.Arrangement with the given name.

Signature ChangeByName(name, partOccs)

Parameters:
  • name (str) – The name of arrangement to change to NOTE: The full Unicode character set is not supported for this parameter.
  • partOccs (list of NXOpen.Assemblies.Component) – The :py:class:`NXOpen.Assemblies.Component`s to be modified

New in version NX7.5.2.

License requirements: assemblies (“ASSEMBLIES MODULE”)

CheckinComponents

ComponentAssembly.CheckinComponents

Checks in array of components as per the option NXOpen.Assemblies.ComponentAssemblyCheckinCheckoutOption.

Signature CheckinComponents(partOccs, checkinInputOption)

Parameters:
Returns:

Any errors that occurred during the check in

Return type:

NXOpen.ErrorList

New in version NX8.5.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

CheckinWorkset

ComponentAssembly.CheckinWorkset

Checks in workset.

Signature CheckinWorkset()

Returns:Any errors that occurred during checking in of workset
Return type:NXOpen.ErrorList

New in version NX8.5.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

CheckoutAllModifiedObjects

ComponentAssembly.CheckoutAllModifiedObjects

Checks out all modified objects in the current session.

checkedOutObjects collection will be type of NXOpen.BasePart or NXOpen.PDM.DesignElementRevision

Signature CheckoutAllModifiedObjects()

Returns:a tuple
Return type:A tuple consisting of (errorList, checkedOutObjects). errorList is a NXOpen.ErrorList. Any errors that occurred during checking out of objects checkedOutObjects is a list of NXOpen.NXObject. Array of NXObjects checked out

New in version NX8.5.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

CheckoutComponents

ComponentAssembly.CheckoutComponents

Checks out array of components as per the option NXOpen.Assemblies.ComponentAssemblyCheckinCheckoutOption.

Signature CheckoutComponents(partOccs, checkoutInputOption)

Parameters:
Returns:

Any errors that occurred during the check out

Return type:

NXOpen.ErrorList

New in version NX8.5.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

CheckoutWorkset

ComponentAssembly.CheckoutWorkset

Checks out workset.

Signature CheckoutWorkset()

Returns:Any errors that occurred during checking out of workset
Return type:NXOpen.ErrorList

New in version NX8.5.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

CloseComponents

ComponentAssembly.CloseComponents

Given an array of components, close the components.

This close of the components will check for different reasons that the part cannot be closed. The reasons will be returned in the PartCloseStatus object.

Signature CloseComponents(componentsToClose, wholeTree, closeModified)

Parameters:
Returns:

Close status for the parts

Return type:

NXOpen.PartCloseStatus

New in version NX6.0.1.

License requirements: None.

ConvertRememberedMcs

ComponentAssembly.ConvertRememberedMcs

Converts all remembered mating constraints in the part of this assembly to remembered assembly constraints

Signature ConvertRememberedMcs()

New in version NX7.5.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

CopyComponents

ComponentAssembly.CopyComponents

Given an array of components, creates copies of the components such that each copy is created under the parent assembly of the original component.

The original components do not need to be under the same parent assembly as each other.

The number of new components may be different from the original number of components if problems occurred during the copy.

Signature CopyComponents(components)

Parameters:components (list of NXOpen.Assemblies.Component) – Components to be copied.
Returns:The newly created copies.
Return type:list of NXOpen.Assemblies.Component

New in version NX6.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

CreateComponentPatternBuilder

ComponentAssembly.CreateComponentPatternBuilder

Creates a NXOpen.Assemblies.ComponentPatternBuilder object This can be used to create or edit a component pattern.

Signature CreateComponentPatternBuilder(compPattern)

Parameters:compPattern (NXOpen.Assemblies.ComponentPattern) – The pattern definition object will be used in edit
Returns:
Return type:NXOpen.Assemblies.ComponentPatternBuilder

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

CreateConstraintGroupBuilder

ComponentAssembly.CreateConstraintGroupBuilder

Creates a NXOpen.Positioning.ComponentConstraintGroupBuilder object.

This can be used to create a constraint group or edit an existing constraint group. The context component decides which displayed constraints are to be used from the member constraints of an existing constraint group. If the context component is None the displayed constraints used are in the same part as the member constraints.

Signature CreateConstraintGroupBuilder(group, contextComponent)

Parameters:
Returns:

Return type:

NXOpen.Positioning.ComponentConstraintGroupBuilder

New in version NX8.0.1.

License requirements: assemblies (“ASSEMBLIES MODULE”)

CreateMatingConverter

ComponentAssembly.CreateMatingConverter

Creates a NXOpen.Positioning.MatingConverter object for this assembly.

This can be used to convert Mating Conditions in this part and in its child components to Assembly Constraints. Note that this part need not be the work part for this.

Signature CreateMatingConverter()

Returns:The new Mating Converter
Return type:NXOpen.Positioning.MatingConverter

New in version NX5.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

DeleteMatingConditions

ComponentAssembly.DeleteMatingConditions

Delete all the mating conditions in this assembly.

This can be used before creating assembly constraints in the assembly, if the mating conditions are not being converted. Component-component mating conditions and inherited mating conditions are not deleted. Update should be called afterwards.

Signature DeleteMatingConditions()

New in version NX7.5.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

FindObject

ComponentAssembly.FindObject

Finds the NXOpen.NXObject with the given identifier as recorded in a journal.

An object may not return the same value as its JournalIdentifier in different versions of the software. However newer versions of the software should find the same object when FindObject is passed older versions of its journal identifier. In general, this method should not be used in handwritten code and exists to support record and playback of journals.

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

Signature FindObject(journalIdentifier)

Parameters:journalIdentifier (str) – Journal identifier of the object
Returns:
Return type:NXOpen.INXObject

New in version NX3.0.0.

License requirements: None.

GetAsRequiredQuantity

ComponentAssembly.GetAsRequiredQuantity

Gets the as-required quantity on this component.

Signature GetAsRequiredQuantity(component)

Parameters:component (NXOpen.Assemblies.Component) – The component to edit. Must be directly owned by this assembly.
Returns:As-Required string “A/R”
Return type:str

New in version NX6.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

GetCheckedoutStatusOfObjects

ComponentAssembly.GetCheckedoutStatusOfObjects

Returns the checkedout status (checkedout/non checkedout) of all the objects open in NX.

Signature GetCheckedoutStatusOfObjects()

Returns:a tuple
Return type:A tuple consisting of (checkedOutObjects, uncheckedOutObjects). checkedOutObjects is a list of NXOpen.NXObject. Array of NXObjects which are open in session and checked out uncheckedOutObjects is a list of NXOpen.NXObject. Array of NXObjects which are open in session but not checkout

New in version NX8.5.0.

License requirements: None.

GetComponentOrders

ComponentAssembly.GetComponentOrders

Returns all :py:class:`NXOpen.Assemblies.ComponentOrder`s available in the part

Signature GetComponentOrders()

Returns:Returns array of :py:class:`NXOpen.Assemblies.ComponentOrder`s in part
Return type:list of NXOpen.Assemblies.ComponentOrder

New in version NX9.0.0.

License requirements: None.

GetComponentQuantityType

ComponentAssembly.GetComponentQuantityType

Gets the quantity type of the components.

Returns NXOpen.Assemblies.ComponentQuantity.

Signature GetComponentQuantityType(component)

Parameters:component (NXOpen.Assemblies.Component) – The component to query. Must be directly owned by this assembly.
Returns:Quantity type an enumeration value
Return type:NXOpen.Assemblies.ComponentQuantity

New in version NX6.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

GetIntegerQuantity

ComponentAssembly.GetIntegerQuantity

Gets the value of the integer quantity of component.

Signature GetIntegerQuantity(component)

Parameters:component (NXOpen.Assemblies.Component) – The component to query. Must be directly owned by this assembly.
Returns:Integer quantity value
Return type:int

New in version NX6.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

GetNonGeometricState

ComponentAssembly.GetNonGeometricState

Gets the component state as Geometric or Non-Geometric.

Signature GetNonGeometricState(component)

Parameters:component (NXOpen.Assemblies.Component) – The component to query. Must be directly owned by this assembly.
Returns:True if the component is non-geometric, false otherwise
Return type:bool

New in version NX6.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

GetRealQuantity

ComponentAssembly.GetRealQuantity

Gets the value of real quantity and corresponding units on this component.

Signature GetRealQuantity(component)

Parameters:component (NXOpen.Assemblies.Component) – The component to query. Must be directly owned by this assembly.
Returns:a tuple
Return type:A tuple consisting of (realQuantity, units). realQuantity is a float. Real quantity value units is a str. Units

New in version NX6.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

GetSuppressedState

ComponentAssembly.GetSuppressedState

Overloaded method GetSuppressedState

  • GetSuppressedState(component)
  • GetSuppressedState(component, arrangement)

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

Gets the suppression state of the component in its controlling arrangement

Signature GetSuppressedState(component)

Parameters:component (NXOpen.Assemblies.Component) – The component to query.
Returns:a tuple
Return type:A tuple consisting of (suppressedState, controlled). suppressedState is a NXOpen.Assemblies.ComponentAssemblySuppressedState. The suppressed state controlled is a bool. Is the suppression state controlled at the level of arrangement?

New in version NX6.0.4.

License requirements: None.

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

Gets the suppression state of the component in the given arrangement.

Signature GetSuppressedState(component, arrangement)

Parameters:
Returns:

a tuple

Return type:

A tuple consisting of (suppressedState, controlled). suppressedState is a NXOpen.Assemblies.ComponentAssemblySuppressedState. The suppressed state controlled is a bool. Is the suppression state controlled at the level of arrangement?

New in version NX6.0.4.

License requirements: None.

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

GetSuppressionExpression

ComponentAssembly.GetSuppressionExpression

Overloaded method GetSuppressionExpression

  • GetSuppressionExpression(component)
  • GetSuppressionExpression(component, arrangement)

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

Gets the expression controlling the suppression of the component in its controlling arrangement

Signature GetSuppressionExpression(component)

Parameters:component (NXOpen.Assemblies.Component) – The component to query.
Returns:The suppression expression.
Return type:NXOpen.Expression

New in version NX6.0.4.

License requirements: None.

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

Gets the expression controlling the suppression of the component in the given arrangment

Signature GetSuppressionExpression(component, arrangement)

Parameters:
Returns:

The suppression expression.

Return type:

NXOpen.Expression

New in version NX6.0.4.

License requirements: None.

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

MapComponentFromParent

ComponentAssembly.MapComponentFromParent

Maps a component in a parent assembly onto a corresponding component in this assembly.

For example, given an Axle assembly: <code>

Axle / / Left Right Wheel Wheel

</code> and a Car assembly containing two Axle components: <code>

Car _______ |_______ / / Front Rear Axle Axle / / / / Front Left Front Right Rear Left Rear Right Wheel Wheel Wheel Wheel

</code>

then calling Axle.MapComponentFromParent with the Front Left Wheel component will return the Left Wheel component. Note that calling Car.MapComponentFromParent on Left Wheel will not work. See NXOpen.Assemblies.ComponentAssembly.MapComponentsFromSubassembly.

Calling Axle.MapComponent with the Left Wheel component will simply return Left Wheel, i.e. it is a null operation.

Note that calling this method may load additional assembly data from the Axle part.

Signature MapComponentFromParent(component)

Parameters:component (NXOpen.Assemblies.Component) – The component to map. This should be defined in the tree of a parent assembly which contains this assembly.
Returns:The mapped component. This will be defined in the

component tree of this assembly parameter.

Return type:NXOpen.Assemblies.Component

New in version NX3.0.0.

License requirements: None.

MapComponentsFromSubassembly

ComponentAssembly.MapComponentsFromSubassembly

Maps a component in a subassembly onto the corresponding components in this parent assembly.

For example, given an Axle assembly: <code>

Axle / / Left Right Wheel Wheel

</code> and a Car assembly containing two Axle components: <code>

Car _______ |_______ / / Front Rear Axle Axle / / / / Front Left Front Right Rear Left Rear Right Wheel Wheel Wheel Wheel

</code>

then calling Car.MapComponentsFromSubassembly on Left Wheel will return Front Left Wheel and Rear Left Wheel. See also NXOpen.Assemblies.ComponentAssembly.MapComponentFromParent.

Signature MapComponentsFromSubassembly(component)

Parameters:component (NXOpen.Assemblies.Component) – The component to map. This must be defined in a subassembly of this assembly.
Returns:The mapped components.
Return type:list of NXOpen.Assemblies.Component

New in version NX3.0.0.

License requirements: None.

MoveComponent

ComponentAssembly.MoveComponent

Moves a component by specifying a translation and rotation.

Note that these are specified in the coordinates of this assembly, which are not necessarily the coordinates of the displayed part. Note that the rotation matrix is expected to be stored in a column order fashion.

Signature MoveComponent(component, translation, rotation)

Parameters:

New in version NX3.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

OpenComponents

ComponentAssembly.OpenComponents

Given an array of components, open the components using the open_option.

Signature OpenComponents(openOption, componentsToOpen)

Parameters:
Returns:

a tuple

Return type:

A tuple consisting of (loadStatus, openStatus). loadStatus is a NXOpen.PartLoadStatus. If any components could not be loaded, this object contains the error information. openStatus is a list of NXOpen.Assemblies.ComponentAssemblyOpenComponentStatus. Shows the status of the objects in an indexed array according to if they could be opened

New in version NX6.0.1.

License requirements: None.

Print

ComponentAssembly.Print

Prints a representation of this object to the system log file.

Signature Print()

New in version NX3.0.0.

License requirements: None.

ReleaseSuppression

ComponentAssembly.ReleaseSuppression

Overloaded method ReleaseSuppression

  • ReleaseSuppression(components, arrangements)
  • ReleaseSuppression(components)

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

Release control of the suppression state of an array of components. The components will no longer have their suppression state controlled by the given arrangements. (Note that it is not an error if the given arrangements do not control the components.)

Signature ReleaseSuppression(components, arrangements)

Parameters:
Returns:

list of errors encountered during the release

Return type:

NXOpen.ErrorList

New in version NX3.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

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

Release control of the suppression state of an array of components. The components will no longer have their suppression state controlled by any of the arrangements in the ComponentAssembly.

Signature ReleaseSuppression(components)

Parameters:components (list of NXOpen.Assemblies.Component) – :py:class:`NXOpen.Assemblies.Component`s to be released
Returns:list of errors encountered during the release
Return type:NXOpen.ErrorList

New in version NX3.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

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

RemoveComponent

ComponentAssembly.RemoveComponent

Removes a component from this assemebly.

Signature RemoveComponent(component)

Parameters:component (NXOpen.Assemblies.Component) – The component to remove. Must be directly owned by this assembly.

New in version NX3.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

ReorderChildrenOfParent

ComponentAssembly.ReorderChildrenOfParent

Assigns a new order to immediate children NXOpen.Assemblies.Component`s of parent :py:class:`NXOpen.Assemblies.Component.

Signature ReorderChildrenOfParent(order, parentComponent, componentsToReorder)

Parameters:

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

ReorderComponents

ComponentAssembly.ReorderComponents

Reorders the array of NXOpen.Assemblies.Component`s before or after the target :py:class:`NXOpen.Assemblies.Component.

NXOpen.Assemblies.Component`s to reorder and the target :py:class:`NXOpen.Assemblies.Component should be children of the same immediate parent.

Signature ReorderComponents(order, componentsToReorder, targetComponent, beforeOrAfter)

Parameters:

New in version NX9.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

ReplaceReferenceSet

ComponentAssembly.ReplaceReferenceSet

Replaces the reference set used by a component.

Note that the names of the default reference sets Empty and Entire Part can be obtained from NXOpen.Assemblies.Component.EmptyPartRefsetName or NXOpen.Assemblies.Component.EntirePartRefsetName.

Signature ReplaceReferenceSet(component, newReferenceSet)

Parameters:
  • component (NXOpen.Assemblies.Component) – The component to edit. Must be directly owned by this assembly.
  • newReferenceSet (str) – The name of the new reference set NOTE: The full Unicode character set is not supported for this parameter.

New in version NX3.0.0.

License requirements: None.

ReplaceReferenceSetInOwners

ComponentAssembly.ReplaceReferenceSetInOwners

Sets the reference set used to represent each component in an array.

This is the equivalent of calling: <code> NXOpen.Assemblies.Component.DirectOwner:py:meth:NXOpen.Assemblies.Component.DirectOwner </code> <code> NXOpen.Assemblies.ComponentAssembly.ReplaceReferenceSet:py:meth:NXOpen.Assemblies.ComponentAssembly.ReplaceReferenceSet </code>

on each component in the array. However, this method will ensure that the reference set operations are carried out in the correct order, so that any effects caused by a parent’s reference set change will be correctly reflected in the children. If changing reference set on components at various levels in the assembly, use this method.

Note that the names of the default reference sets Empty and Entire Part can be obtained from NXOpen.Assemblies.Component.EmptyPartRefsetName or NXOpen.Assemblies.Component.EntirePartRefsetName.

Signature ReplaceReferenceSetInOwners(newReferenceSet, components)

Parameters:
  • newReferenceSet (str) – The name of the new reference set NOTE: The full Unicode character set is not supported for this parameter.
  • components (list of NXOpen.Assemblies.Component) – Components to be edited. Each component will have its reference set updated in its owning assembly.
Returns:

list of errors encountered during the edit

Return type:

NXOpen.ErrorList

New in version NX3.0.0.

License requirements: None.

RestructureComponents

ComponentAssembly.RestructureComponents

Given an array of components and a specified parent this function will transfer the given components to the parent.

The original components do not need to be under the same parent assembly as each other.

The number of new components may be different from the original number of components if problems occurred during the transfer

Signature RestructureComponents(origComponents, newParentComponent, deleteFlag)

Parameters:
Returns:

a tuple

Return type:

A tuple consisting of (newComponents, errorList). newComponents is a list of NXOpen.Assemblies.Component. Restructured components errorList is a NXOpen.ErrorList. Any errors that occurred during the restructure

New in version NX6.0.1.

License requirements: assemblies (“ASSEMBLIES MODULE”)

SetAsRequiredQuantity

ComponentAssembly.SetAsRequiredQuantity

Sets the as-required quantity on this component.

Signature SetAsRequiredQuantity(component)

Parameters:component (NXOpen.Assemblies.Component) – The component to edit. Must be directly owned by this assembly.

New in version NX6.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

SetDefault

ComponentAssembly.SetDefault

Set the default NXOpen.Assemblies.Arrangement for the given NXOpen.Assemblies.ComponentAssembly.

Signature SetDefault(arrangement)

Parameters:arrangement (NXOpen.Assemblies.Arrangement) – The new default NXOpen.Assemblies.Arrangement.

New in version NX7.5.2.

License requirements: assemblies (“ASSEMBLIES MODULE”)

SetEmptyRefset

ComponentAssembly.SetEmptyRefset

Convenience method for setting the reference set used to represent a component to be empty

Signature SetEmptyRefset(component)

Parameters:component (NXOpen.Assemblies.Component) – The component to edit. Must be directly owned by this assembly.

New in version NX3.0.0.

License requirements: None.

SetEntirePartRefset

ComponentAssembly.SetEntirePartRefset

Convenience method for setting the reference set used to represent a component to be the entire part.

Signature SetEntirePartRefset(component)

Parameters:component (NXOpen.Assemblies.Component) – The component to edit. Must be directly owned by this assembly.

New in version NX3.0.0.

License requirements: None.

SetIntegerQuantity

ComponentAssembly.SetIntegerQuantity

Sets the integer quantity on this component.

Signature SetIntegerQuantity(component, integerQuantity)

Parameters:
  • component (NXOpen.Assemblies.Component) – The component to edit. Must be directly owned by this assembly.
  • integerQuantity (int) – Integer quantity value

New in version NX6.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

SetName

ComponentAssembly.SetName

Sets the custom name of the object.

NOTE: This method should not be used to edit a read-only object such as a Mirrored PMI object. If it is, the changes will be overridden when the part is updated.

Signature SetName(name)

Parameters:name (str) –

New in version NX3.0.0.

License requirements: None.

SetNonGeometricState

ComponentAssembly.SetNonGeometricState

Sets the component state to Geometric or Non-Geometric.

Component which are made non-geometric are undrawn from graphics area.

Signature SetNonGeometricState(component, nonGeometricState)

Parameters:
  • component (NXOpen.Assemblies.Component) – The component to edit. Must be directly owned by this assembly.
  • nonGeometricState (bool) – True to make component non-geometric, false otherwise

New in version NX6.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

SetRealQuantity

ComponentAssembly.SetRealQuantity

Sets the real quantity and corresponding units on this component.

Signature SetRealQuantity(component, realQuantity, quantityUnits)

Parameters:
  • component (NXOpen.Assemblies.Component) – The component to edit. Must be directly owned by this assembly.
  • realQuantity (float) – Real quantity value
  • quantityUnits (str) – Units NOTE: The full Unicode character set is not supported for this parameter.

New in version NX6.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

SubstituteComponent

ComponentAssembly.SubstituteComponent

Substitutes an old component with a new component.

The new component represents a new part, but will be placed in the same location as the original.

Signature SubstituteComponent(component, part, newName, referenceSet, layer, mode)

Parameters:
  • component (NXOpen.Assemblies.Component) – The old component to be substituted.
  • part (NXOpen.BasePart) – The new part
  • newName (str) – The name for the new component NOTE: The full Unicode character set is not supported for this parameter.
  • referenceSet (str) – The name of the reference set for the new component NOTE: The full Unicode character set is not supported for this parameter.
  • layer (int) – The layer for the new component -1 means use the original layers defined in the component. 0 means use the work layer 1-256 means use the specified layer.
  • mode (NXOpen.Assemblies.ComponentAssemblySubstitutionMode) – Defines the substitution mode
Returns:

The new Component that replaces the old one.

Return type:

NXOpen.Assemblies.Component

New in version NX3.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

SuppressComponents

ComponentAssembly.SuppressComponents

Overloaded method SuppressComponents

  • SuppressComponents(components, arrangements)
  • SuppressComponents(components)
  • SuppressComponents(components, arrangements, expression)

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

Suppresses an array of components

Signature SuppressComponents(components, arrangements)

Parameters:
  • components (list of NXOpen.Assemblies.Component) – :py:class:`NXOpen.Assemblies.Component`s to be suppressed
  • arrangements (list of NXOpen.Assemblies.Arrangement) – Arrangements in which components should be suppressed. These arrangements must be defined in this ComponentAssembly
Returns:

list of errors encountered during the suppress

Return type:

NXOpen.ErrorList

New in version NX3.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

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

Suppresses an array of components in all NXOpen.Assemblies.Arrangement s in this ComponentAssembly

Signature SuppressComponents(components)

Parameters:components (list of NXOpen.Assemblies.Component) – :py:class:`NXOpen.Assemblies.Component`s to be suppressed
Returns:list of errors encountered during the suppress
Return type:NXOpen.ErrorList

New in version NX3.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

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

Suppresses an array of components in all NXOpen.Assemblies.Arrangement s in this ComponentAssembly

Signature SuppressComponents(components, arrangements, expression)

Parameters:
  • components (list of NXOpen.Assemblies.Component) – :py:class:`NXOpen.Assemblies.Component`s to be suppressed
  • arrangements (list of NXOpen.Assemblies.Arrangement) – Arrangements in which components should be unsuppressed
  • expression (str) – Suppress components if expression evalutes zero else unsuppress components NOTE: The full Unicode character set is not supported for this parameter.
Returns:

list of errors encountered during the suppress

Return type:

NXOpen.ErrorList

New in version NX5.0.1.

License requirements: assemblies (“ASSEMBLIES MODULE”)

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

UnsuppressComponents

ComponentAssembly.UnsuppressComponents

Overloaded method UnsuppressComponents

  • UnsuppressComponents(components, arrangements)
  • UnsuppressComponents(components)

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

Unsuppresses an array of components in this ComponentAssembly

Signature UnsuppressComponents(components, arrangements)

Parameters:
  • components (list of NXOpen.Assemblies.Component) – :py:class:`NXOpen.Assemblies.Component`s to be unsuppressed
  • arrangements (list of NXOpen.Assemblies.Arrangement) – Arrangements in which components should be unsuppressed. These arrangements must be defined in this ComponentAssembly
Returns:

list of errors encountered during the unsuppress

Return type:

NXOpen.ErrorList

New in version NX3.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

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

Unsuppresses an array of components in all NXOpen.Assemblies.Arrangement s in this ComponentAssembly

Signature UnsuppressComponents(components)

Parameters:components (list of NXOpen.Assemblies.Component) – :py:class:`NXOpen.Assemblies.Component`s to be unsuppressed
Returns:list of errors encountered during the unsuppress
Return type:NXOpen.ErrorList

New in version NX3.0.0.

License requirements: assemblies (“ASSEMBLIES MODULE”)

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