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. 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 . |
GetComponentPorts | Given a component, returns the port occurrences that belong to it. |
GetObjectPorts | Given any NXObject , returns any port occurrences that belong to it. Returns None otherwise. The type of ports returned depends on the type of object given. If given a NXOpen.Routing.ISegment , if there is stock on the segment, returns the ports from stock. |
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”)
-------------------------------------
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”)
GetObjectPorts¶
-
PortCollection.
GetObjectPorts
¶ Given any
NXObject
, returns any port occurrences that belong to it. Returns None otherwise.The type of ports returned depends on the type of object given.
If given a
NXOpen.Routing.ISegment
, if there is stock on the segment, returns the ports from stock.If there is no stock, returns any fitting ports at the segment ends.
If given a
NXOpen.Routing.Stock
, returns the ports at ends of stock.If given a
NXOpen.Routing.Port
, returns itself.if given a
NXOpen.Routing.ControlPoint
, returns any fitting ports at the Control Point.If given a part, returns any ports in the part.
Signature
GetObjectPorts(entity)
Parameters: entity ( NXOpen.NXObject
) –Returns: Return type: list of NXOpen.Routing.Port
New in version NX11.0.1.
License requirements: routing_base (“Routing Basic”)