PortCollection Class¶
-
class
NXOpen.Routing.
PortCollection
¶ Bases:
object
Represents a collection of
NXOpen.Routing.Port
objects.Iterating this collection only returns live uncondemned objects contained in the owning part of the collection. Note that
NXOpen.Routing.Port
is a smart object and many smart objects are condemned as they only exist to support other objects and are not displayed. Condemned objects will be deleted when their references go away. To obtain an instance of this class, refer toNXOpen.Routing.RouteManager
New in version NX4.0.0.
Methods¶
Method | Description |
---|---|
ConvertToFeatures | Cycles through all the NXOpen.Routing.Port objects and creates a NXOpen.Routing.FeaturePort object for NXOpen.Routing.FittingPort object, NXOpen.Routing.FixturePort object, NXOpen.Routing.MultiPort object, and NXOpen.Routing.TerminalPort object. |
CreateExtractPort | Creates a NXOpen.Routing.ExtractPort . |
CreateStockOffsetPort | Create a Stock Offset Port. |
GetComponentPorts | Given a component, returns the port occurrences that belong to it. |
Method Detail¶
ConvertToFeatures¶
-
PortCollection.
ConvertToFeatures
¶ Cycles through all the
NXOpen.Routing.Port
objects and creates aNXOpen.Routing.FeaturePort
object forNXOpen.Routing.FittingPort
object,NXOpen.Routing.FixturePort
object,NXOpen.Routing.MultiPort
object, andNXOpen.Routing.TerminalPort
object.Signature
ConvertToFeatures()
New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
CreateExtractPort¶
-
PortCollection.
CreateExtractPort
¶ Overloaded method CreateExtractPort
CreateExtractPort(port)
CreateExtractPort(port, allowMultipleConnections)
-------------------------------------
Creates a
NXOpen.Routing.ExtractPort
. Default allows multiple connections to this port.Signature
CreateExtractPort(port)
Parameters: port ( NXOpen.Routing.Port
) – Port to extract fromReturns: Extracted Port Return type: NXOpen.Routing.ExtractPort
New in version NX4.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Creates a
NXOpen.Routing.ExtractPort
.Signature
CreateExtractPort(port, allowMultipleConnections)
Parameters: - port (
NXOpen.Routing.Port
) – Port to extract from - allowMultipleConnections (bool) – Does this fitting port allow multiple wires to be routed to it?
Returns: Extracted Port
Return type: New in version NX4.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
CreateStockOffsetPort¶
-
PortCollection.
CreateStockOffsetPort
¶ Create a Stock Offset Port.
Signature
CreateStockOffsetPort(partOccurrence, portPrototype)
Parameters: - partOccurrence (
NXOpen.Assemblies.Component
) – The part occurrence from which to create the stock offset port. - portPrototype (
NXOpen.Routing.Port
) – The prototype of the stock offset port in the part occurrence.
Returns: The stock offset port in the work part.
Return type: New in version NX7.5.4.
Deprecated since version NX8.0.2: Use the
NXOpen.Routing.StockOffsetPortCollection.CreateStockOffsetPort()
on theNXOpen.Routing.StockOffsetPortCollection
class instead.License requirements: routing_base (“Routing Basic”)
- partOccurrence (
GetComponentPorts¶
-
PortCollection.
GetComponentPorts
¶ Given a component, returns the port occurrences that belong to it.
Returns None otherwise.
Signature
GetComponentPorts(component)
Parameters: component ( NXOpen.Assemblies.Component
) –Returns: Return type: list of NXOpen.Routing.Port
New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)