DistanceSensorBuilder Class — NXOpen Python API Reference 12.0.0 documentation

# DistanceSensorBuilder Class

class `NXOpen.Mechatronics.``DistanceSensorBuilder`

  Bases: `NXOpen.Builder`

  Represents a `NXOpen.Mechatronics.DistanceSensor` builder.

  To create a new instance of this class, use `NXOpen.Mechatronics.DistanceSensorCollection.CreateDistanceSensorBuilder()`

  New in version NX11.0.0.

# Properties

Property | Description
--- | ---
Angle | Returns the open angle. The angle between the cone surface and the Direction.
Category | Returns or sets the category. It should be between 0 and 16.
Direction | Returns or sets the direction. The Distance Sensor has the scope of a cone. The direction is the vector of the cone.
HighlightOnCollision | Returns or sets the option of highlight on collision. If the highlight is true, then the sensor will be highlighted when it is collided or triggered during simulation.
LowerOutputRange | Returns the lower output range used to scale the distance data. Its measure type contains constant, voltage, current
MeasureType | Returns or sets the measure type.
Name | Returns or sets the name.
Point | Returns or sets the point. Sensor Reference Point, also used as start point to measure the distance
Range | Returns the range of distance sensor. Also as the height of the cone
RigidBody | Returns the Rigid Body. This can be a `NXOpen.Mechatronics.RigidBody` If there is a rigid body, then the sensor will move with the rigid body.
Tag | Returns the Tag for this object.
UpperOutputRange | Returns the upper output range used to scale the distance data.
UseScale | Returns or sets the use scale flag, which is used to control if the distance sensor includes scale parameters.

# Methods

Method | Description
--- | ---
Commit | Commits any edits that have been applied to the builder.
Destroy | Deletes the builder, and cleans up any objects created by the builder.
GetCommittedObjects | For builders that create more than one object, this method returns the objects that are created by commit.
GetObject | Returns the object currently being edited by this builder.
ShowResults | Updates the model to reflect the result of an edit to the model for all builders that support showing results.
Validate | Validate whether the inputs to the component are sufficient for commit to be called.

# Enumerations

DistanceSensorBuilderOutputMeasureType Enumeration | the Measure types.

# Property Detail

## Angle

`DistanceSensorBuilder.``Angle`

  Returns the open angle. The angle between the cone surface and the Direction.

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

  Getter Method

  Signature `Angle`

  Returns: |
  Return type: | `NXOpen.Expression`

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

## Category

`DistanceSensorBuilder.``Category`

  Returns or sets the category. It should be between 0 and 16.

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

  Getter Method

  Signature `Category`

  Returns: |
  Return type: | int

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

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

  Setter Method

  Signature `Category`

  Parameters: | category (int) –

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

## Direction

`DistanceSensorBuilder.``Direction`

  Returns or sets the direction. The Distance Sensor has the scope of a cone. The direction is the vector of the cone.

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

  Getter Method

  Signature `Direction`

  Returns: |
  Return type: | `NXOpen.Direction`

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

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

  Setter Method

  Signature `Direction`

  Parameters: | direction (`NXOpen.Direction`) –

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

## HighlightOnCollision

`DistanceSensorBuilder.``HighlightOnCollision`

  Returns or sets the option of highlight on collision. If the highlight is true, then the sensor will be highlighted when it is collided or triggered during simulation.

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

  Getter Method

  Signature `HighlightOnCollision`

  Returns: |
  Return type: | bool

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

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

  Setter Method

  Signature `HighlightOnCollision`

  Parameters: | highlight (bool) –

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

## LowerOutputRange

`DistanceSensorBuilder.``LowerOutputRange`

  Returns the lower output range used to scale the distance data. Its measure type contains constant, voltage, current

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

  Getter Method

  Signature `LowerOutputRange`

  Returns: |
  Return type: | `NXOpen.Expression`

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

## MeasureType

`DistanceSensorBuilder.``MeasureType`

  Returns or sets the measure type.

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

  Getter Method

  Signature `MeasureType`

  Returns: |
  Return type: | `NXOpen.Mechatronics.DistanceSensorBuilderOutputMeasureType`

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

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

  Setter Method

  Signature `MeasureType`

  Parameters: | measureType (`NXOpen.Mechatronics.DistanceSensorBuilderOutputMeasureType`) –

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

## Name

`DistanceSensorBuilder.``Name`

  Returns or sets the name.

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

  Getter Method

  Signature `Name`

  Returns: |
  Return type: | str

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

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

  Setter Method

  Signature `Name`

  Parameters: | name (str) –

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

## Point

`DistanceSensorBuilder.``Point`

  Returns or sets the point. Sensor Reference Point, also used as start point to measure the distance

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

  Getter Method

  Signature `Point`

  Returns: |
  Return type: | `NXOpen.Point`

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

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

  Setter Method

  Signature `Point`

  Parameters: | point (`NXOpen.Point`) –

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

## Range

`DistanceSensorBuilder.``Range`

  Returns the range of distance sensor. Also as the height of the cone

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

  Getter Method

  Signature `Range`

  Returns: |
  Return type: | `NXOpen.Expression`

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

## RigidBody

`DistanceSensorBuilder.``RigidBody`

  Returns the Rigid Body. This can be a `NXOpen.Mechatronics.RigidBody` If there is a rigid body, then the sensor will move with the rigid body.

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

  Getter Method

  Signature `RigidBody`

  Returns: |
  Return type: | `NXOpen.Mechatronics.SelectRigidBody`

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

## UpperOutputRange

`DistanceSensorBuilder.``UpperOutputRange`

  Returns the upper output range used to scale the distance data.

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

  Getter Method

  Signature `UpperOutputRange`

  Returns: |
  Return type: | `NXOpen.Expression`

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

## UseScale

`DistanceSensorBuilder.``UseScale`

  Returns or sets the use scale flag, which is used to control if the distance sensor includes scale parameters.

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

  Getter Method

  Signature `UseScale`

  Returns: |
  Return type: | bool

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

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

  Setter Method

  Signature `UseScale`

  Parameters: | useScale (bool) –

  New in version NX11.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

# Method Detail

## Validate

`DistanceSensorBuilder.``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.