PortVariable Class — NXOpen Python API Reference 12.0.0 documentation

# PortVariable Class

class `NXOpen.Motion.``PortVariable`

  Bases: `NXOpen.TaggedObject`, `NXOpen.GeometricUtilities.IComponentBuilder`

  Represents a `Motion.PortVariable`.

  This class contains the port association for the output of a mechatronics element No KF support

  New in version NX11.0.0.

# Properties

Property | Description
--- | ---
AssociatedPortName | Returns or sets the associated port name
Name | Returns the name
Port | Returns the port
Tag | Returns the Tag for this object.
Unit | Returns the unit

# Methods

Method | Description
--- | ---
Validate | Validate whether the inputs to the component are sufficient for commit to be called.

# Property Detail

## AssociatedPortName

`PortVariable.``AssociatedPortName`

  Returns or sets the associated port name

  `-------------------------------------`

  Getter Method

  Signature `AssociatedPortName`

  Returns: |
  Return type: | str

  New in version NX11.0.0.

  License requirements: mechanisms (“MECHANISMS”)

  `-------------------------------------`

  Setter Method

  Signature `AssociatedPortName`

  Parameters: | associatedPortName (str) –

  New in version NX11.0.0.

  License requirements: mechanisms (“MECHANISMS”)

## Name

`PortVariable.``Name`

  Returns the name

  `-------------------------------------`

  Getter Method

  Signature `Name`

  Returns: |
  Return type: | str

  New in version NX11.0.0.

  License requirements: mechanisms (“MECHANISMS”)

## Port

`PortVariable.``Port`

  Returns the port

  `-------------------------------------`

  Getter Method

  Signature `Port`

  Returns: |
  Return type: | `NXOpen.Motion.ControlPort`

  New in version NX11.0.0.

  License requirements: mechanisms (“MECHANISMS”)

## Unit

`PortVariable.``Unit`

  Returns the unit

  `-------------------------------------`

  Getter Method

  Signature `Unit`

  Returns: |
  Return type: | int

  New in version NX11.0.0.

  License requirements: mechanisms (“MECHANISMS”)

# Method Detail

## Validate

`PortVariable.``Validate`

  Validate whether the inputs to the component are sufficient for commit to be called.

  If the component is not in a state to commit then an exception is thrown. For example, if the component requires you to set some property, this method will throw an exception if you haven’t set it. This method throws a not-yet-implemented NXException for some components.

  Signature `Validate()`

  Returns: | Was self validation successful
  Return type: | bool

  New in version NX3.0.1.

  License requirements: None.