RoutingPartLibrary Class — NXOpen Python API Reference 12.0.0 documentation

# RoutingPartLibrary Class

class `NXOpen.Preferences.``RoutingPartLibrary`

  Bases: `object`

  Represents a Routing Part library.

  To obtain an instance of this class, refer to `NXOpen.Preferences.RoutingPart`

  New in version NX4.0.0.

# Methods

Method | Description
--- | ---
CreateCriteria | Creates a new empty `NXOpen.Routing.CharacteristicList` object that can be used as input to `Preferences.RoutingPartLibrary.MatchCriteria()` and `Preferences.RoutingPartLibrary.MatchCriteriaWithFilter()`.
FilterOnCurrentSpecifications | Does a characteristic list match the current discipline and specifications?
GetChildrenNodes | Returns the children nodes of the input node.
GetFilteredRoot | Returns the root node of the part library using the current active discipline.
GetNodeType | Returns the node type.
GetPartDefinition | Returns the part information for a given `NXOpen.Preferences.RoutingPartLibraryNodeType.Part` node.
GetRoot | Returns the root node of the part library.
GetTableDefinition | Returns the table information for a given `NXOpen.Preferences.RoutingPartLibraryNodeType.Table` node.
MatchCriteria | Search for entries in the part library table nodes that match the given set of criteria.
MatchCriteriaWithFilter | Similar to `Preferences.RoutingPartLibrary.MatchCriteria()`, however it also filters out any parts that don’t match the critiera specified by the current specification.

# Enumerations

RoutingPartLibraryColumnStatus Enumeration | Hidden status of a column.
RoutingPartLibraryColumnType Enumeration | Type of column values.
RoutingPartLibraryNodeType Enumeration | Type of nodes in the part library.
RoutingPartLibraryRootType Enumeration | Type of root nodes.

# Structs

RoutingPartLibraryColumn_Struct Struct | Part table column type.

# Method Detail

## CreateCriteria

`RoutingPartLibrary.``CreateCriteria`

  Creates a new empty `NXOpen.Routing.CharacteristicList` object that can be used as input to `Preferences.RoutingPartLibrary.MatchCriteria()` and `Preferences.RoutingPartLibrary.MatchCriteriaWithFilter()`.

  Signature `CreateCriteria()`

  Returns: |
  Return type: | `NXOpen.Routing.CharacteristicList`

  New in version NX4.0.0.

  License requirements: routing_base (“Routing Basic”)

## FilterOnCurrentSpecifications

`RoutingPartLibrary.``FilterOnCurrentSpecifications`

  Does a characteristic list match the current discipline and specifications?

  Signature `FilterOnCurrentSpecifications(match, partClasses)`

  Parameters:

  - match (`NXOpen.Routing.CharacteristicList`) – The matching part’s Characteristic List to check against the current discipline and specifications.
  - partClasses (list of str) – The part class hierarchy list that contains the matching part. The first item in the list is the top node name. The last item in the list is the lowest node that contains the matching part.

  Returns: | Is the characteristic list valid under the current discipline and specifications?
  Return type: | bool

  New in version NX4.0.0.

  License requirements: routing_base (“Routing Basic”)

## GetChildrenNodes

`RoutingPartLibrary.``GetChildrenNodes`

  Returns the children nodes of the input node.

  Signature `GetChildrenNodes(parent)`

  Parameters: | parent (str) –
  Returns: |
  Return type: | list of str

  New in version NX4.0.0.

  License requirements: routing_base (“Routing Basic”)

## GetFilteredRoot

`RoutingPartLibrary.``GetFilteredRoot`

  Returns the root node of the part library using the current active discipline.

  Returns None if there is no root node.

  Signature `GetFilteredRoot(rootType)`

  Parameters: | rootType (`NXOpen.Preferences.RoutingPartLibraryRootType`) – Which root node to find.
  Returns: |
  Return type: | str

  New in version NX4.0.0.

  License requirements: routing_base (“Routing Basic”)

## GetNodeType

`RoutingPartLibrary.``GetNodeType`

  Returns the node type.

  Signature `GetNodeType(node)`

  Parameters: | node (str) –
  Returns: |
  Return type: | `NXOpen.Preferences.RoutingPartLibraryNodeType`

  New in version NX4.0.0.

  License requirements: routing_base (“Routing Basic”)

## GetPartDefinition

`RoutingPartLibrary.``GetPartDefinition`

  Returns the part information for a given `NXOpen.Preferences.RoutingPartLibraryNodeType.Part` node.

  Signature `GetPartDefinition(node)`

  Parameters: | node (str) – Must be a `NXOpen.Preferences.RoutingPartLibraryNodeType.Part` type node, any other node type causes an exception.
  Returns: |
  Return type: | `NXOpen.Routing.CharacteristicList`

  New in version NX4.0.0.

  License requirements: routing_base (“Routing Basic”)

## GetRoot

`RoutingPartLibrary.``GetRoot`

  Returns the root node of the part library.

  Returns None if there is no root node.

  Signature `GetRoot()`

  Returns: |
  Return type: | str

  New in version NX4.0.0.

  License requirements: routing_base (“Routing Basic”)

## GetTableDefinition

`RoutingPartLibrary.``GetTableDefinition`

  Returns the table information for a given `NXOpen.Preferences.RoutingPartLibraryNodeType.Table` node.

  Signature `GetTableDefinition(node)`

  Parameters: | node (str) – Must be a `NXOpen.Preferences.RoutingPartLibraryNodeType.Table` type node, any other node type causes an exception.
  Returns: |
  Return type: | list of `NXOpen.Preferences.RoutingPartLibraryColumn_Struct`

  New in version NX4.0.0.

  License requirements: routing_base (“Routing Basic”)

## MatchCriteria

`RoutingPartLibrary.``MatchCriteria`

  Search for entries in the part library table nodes that match the given set of criteria.

  Returns an array of `NXOpen.Routing.CharacteristicList` objects that can be used for assigning stock or placing parts. Searches all nodes at or below the input node for matches.

  Performs matches on the name/value pairs in the input critiera, to the column name column values in the part tables below the input node. Ignores names in the input critiera that don’t have a corresonding column in the part for matching.

  Signature `MatchCriteria(startNode, criteria)`

  Parameters:

  - startNode (str) – Must not be a `NXOpen.Preferences.RoutingPartLibraryNodeType.Part` node.
  - criteria (`NXOpen.Routing.CharacteristicList`) –

  Returns: |
  Return type: | list of `NXOpen.Routing.CharacteristicList`

  New in version NX4.0.0.

  License requirements: routing_base (“Routing Basic”)

## MatchCriteriaWithFilter

`RoutingPartLibrary.``MatchCriteriaWithFilter`

  Similar to `Preferences.RoutingPartLibrary.MatchCriteria()`, however it also filters out any parts that don’t match the critiera specified by the current specification.

  Signature `MatchCriteriaWithFilter(startNode, criteria)`

  Parameters:

  - startNode (str) – Must not be a `NXOpen.Preferences.RoutingPartLibraryNodeType.Part` node.
  - criteria (`NXOpen.Routing.CharacteristicList`) –

  Returns: |
  Return type: | list of `NXOpen.Routing.CharacteristicList`

  New in version NX4.0.0.

  License requirements: routing_base (“Routing Basic”)