BlockFeatureBuilder Class — NXOpen Python API Reference 12.0.0 documentation

# BlockFeatureBuilder Class

class `NXOpen.Features.``BlockFeatureBuilder`

  Bases: `NXOpen.Features.FeatureBuilder`

  Represents a block feature builder.

  To create a new instance of this class, use `NXOpen.Features.FeatureCollection.CreateBlockFeatureBuilder()`

  New in version NX3.0.0.

# Properties

Property | Description
--- | ---
BooleanOption | Returns the boolean option
BooleanType | Returns or sets the boolean operation for the block
Height | Returns the expression representing the block height.
Length | Returns the expression representing the block length.
Origin | Returns or sets the point coordinates representing the block origin.
OriginPoint | Returns or sets the block origin point
ParentAssociativity | Returns or sets the option to keep associativity of the Origin and Origin Offset Points
ParentFeatureInternal | Returns or sets whether or not the latest timestamped parent feature of this feature should be made internal
PatchSolutionFlag | Returns or sets the patch solution flag
PatchSurfaceFilename | Returns or sets the patch surface filename
PointFromOrigin | Returns or sets the point which defines values along the x, y axes of the WCS from origin point, when type is two point and height.
SurroundingPatchSurfaceFilename | Returns or sets the surrounding patch surface filename
Tag | Returns the Tag for this object.
Target | Returns or sets the target body for the boolean operation (if any) for the block
Type | Returns or sets the type represented by `NXOpen.Features.BlockFeatureBuilderTypes`
Width | Returns the expression representing the block width.

# Methods

Method | Description
--- | ---
Commit | Commits any edits that have been applied to the builder.
CommitFeature | Commits the feature parameters and creates the feature
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.
GetFeature | Returns the feature currently being edited by this builder.
GetObject | Returns the object currently being edited by this builder.
GetOrientation | Gets the orientation (x and y axes) of the block.
HideInternalParentFeatureAfterEdit | Re-suppress an internal parent feature (a slave feature) after it has been edited.
SetBooleanOperationAndTarget | Set the boolean operation for creating the block and the boolean operation target body
SetHeight | The expression representing the block height.
SetLength | The expression representing the block length.
SetOrientation | Sets the orientation for the block
SetOriginAndLengths | Create a block by setting the origin and the block length, width, and height.
SetParentFeatureInternal | Set the parent features which would be internal or slaves to the feature being created or commited
SetTwoDiagonalPoints | Create a block by setting two diagonal points, one at the block origin and one at the opposite corner point.
SetTwoPointsAndHeight | Create a block by setting the block height and two diagonal points in the WCS x-y plane.
SetWidth | The expression representing the block width.
ShowInternalParentFeatureForEdit | Unsuppress an internal parent feature (a slave feature) so it can be edited.
ShowResults | Updates the model to reflect the result of an edit to the model for all builders that support showing results.
UnsetParentFeatureInternal | Set the internal parent feature of the feature being edited to external
Validate | Validate whether the inputs to the component are sufficient for commit to be called.

# Enumerations

BlockFeatureBuilderTypes Enumeration | Represents the block types

# Property Detail

## BooleanOption

`BlockFeatureBuilder.``BooleanOption`

  Returns the boolean option

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

  Getter Method

  Signature `BooleanOption`

  Returns: |
  Return type: | `NXOpen.GeometricUtilities.BooleanOperation`

  New in version NX6.0.0.

  License requirements: None.

## BooleanType

`BlockFeatureBuilder.``BooleanType`

  Returns or sets the boolean operation for the block

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

  Getter Method

  Signature `BooleanType`

  Returns: |
  Return type: | `NXOpen.Features.FeatureBooleanType`

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

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

  Setter Method

  Signature `BooleanType`

  Parameters: | booleanType (`NXOpen.Features.FeatureBooleanType`) –

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

## Height

`BlockFeatureBuilder.``Height`

  Returns the expression representing the block height.

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

  Getter Method

  Signature `Height`

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

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

## Length

`BlockFeatureBuilder.``Length`

  Returns the expression representing the block length.

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

  Getter Method

  Signature `Length`

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

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

## Origin

`BlockFeatureBuilder.``Origin`

  Returns or sets the point coordinates representing the block origin.

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

  Getter Method

  Signature `Origin`

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

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

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

  Setter Method

  Signature `Origin`

  Parameters: | origin (`NXOpen.Point3d`) –

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

## OriginPoint

`BlockFeatureBuilder.``OriginPoint`

  Returns or sets the block origin point

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

  Getter Method

  Signature `OriginPoint`

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

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `OriginPoint`

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

  New in version NX6.0.0.

  License requirements: None.

## ParentAssociativity

`BlockFeatureBuilder.``ParentAssociativity`

  Returns or sets the option to keep associativity of the Origin and Origin Offset Points

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

  Getter Method

  Signature `ParentAssociativity`

  Returns: |
  Return type: | bool

  New in version NX8.0.0.

  License requirements: None.

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

  Setter Method

  Signature `ParentAssociativity`

  Parameters: | parentAssociativity (bool) –

  New in version NX8.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR features_modeling (“FEATURES MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

## PointFromOrigin

`BlockFeatureBuilder.``PointFromOrigin`

  Returns or sets the point which defines values along the x, y axes of the WCS from origin point, when type is two point and height.

  the point which defines values along the x, y and z axes of the WCS from origin point, when type is diagonal points.

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

  Getter Method

  Signature `PointFromOrigin`

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

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `PointFromOrigin`

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

  New in version NX6.0.0.

  License requirements: None.

## Target

`BlockFeatureBuilder.``Target`

  Returns or sets the target body for the boolean operation (if any) for the block

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

  Getter Method

  Signature `Target`

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

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

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

  Setter Method

  Signature `Target`

  Parameters: | target (`NXOpen.Body`) –

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

## Type

`BlockFeatureBuilder.``Type`

  Returns or sets the type represented by `NXOpen.Features.BlockFeatureBuilderTypes`

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

  Getter Method

  Signature `Type`

  Returns: |
  Return type: | `NXOpen.Features.BlockFeatureBuilderTypes`

  New in version NX6.0.0.

  License requirements: None.

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

  Setter Method

  Signature `Type`

  Parameters: | type (`NXOpen.Features.BlockFeatureBuilderTypes`) –

  New in version NX6.0.0.

  License requirements: None.

## Width

`BlockFeatureBuilder.``Width`

  Returns the expression representing the block width.

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

  Getter Method

  Signature `Width`

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

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

# Method Detail

## GetOrientation

`BlockFeatureBuilder.``GetOrientation`

  Gets the orientation (x and y axes) of the block.

  Signature `GetOrientation()`

  Returns: | a tuple
  Return type: | A tuple consisting of (xAxis, yAxis). xAxis is a `NXOpen.Vector3d`. yAxis is a `NXOpen.Vector3d`.

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

## SetBooleanOperationAndTarget

`BlockFeatureBuilder.``SetBooleanOperationAndTarget`

  Set the boolean operation for creating the block and the boolean operation target body

  Signature `SetBooleanOperationAndTarget(booleanOperation, targetBody)`

  Parameters:

  - booleanOperation (`NXOpen.Features.FeatureBooleanType`) – Type of boolean operation.
  - targetBody (`NXOpen.Body`) – Target body for boolean operation. Set to a null reference (Nothing in Visual Basic) for a boolean create operation.

  New in version NX3.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR features_modeling (“FEATURES MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

## SetHeight

`BlockFeatureBuilder.``SetHeight`

  The expression representing the block height.

  Signature `SetHeight(height)`

  Parameters: | height (str) –

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

## SetLength

`BlockFeatureBuilder.``SetLength`

  The expression representing the block length.

  Signature `SetLength(length)`

  Parameters: | length (str) –

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

## SetOrientation

`BlockFeatureBuilder.``SetOrientation`

  Sets the orientation for the block

  Signature `SetOrientation(xAxis, yAxis)`

  Parameters:

  - xAxis (`NXOpen.Vector3d`) –
  - yAxis (`NXOpen.Vector3d`) –

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

## SetOriginAndLengths

`BlockFeatureBuilder.``SetOriginAndLengths`

  Create a block by setting the origin and the block length, width, and height.

  The origin of the block is specified by the input origin point in absolute coordinates. The orientation of the block is along the x, y, and z axes of the WCS.

  Signature `SetOriginAndLengths(originPoint, lengthExpression, widthExpression, heightExpression)`

  Parameters:

  - originPoint (`NXOpen.Point3d`) – Block origin point
  - lengthExpression (str) – Block length in the WCS x direction
  - widthExpression (str) – Block width in the WCS y direction
  - heightExpression (str) – Block height in the WCS z direction

  New in version NX3.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR features_modeling (“FEATURES MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

## SetTwoDiagonalPoints

`BlockFeatureBuilder.``SetTwoDiagonalPoints`

  Create a block by setting two diagonal points, one at the block origin and one at the opposite corner point.

  The orientation of the block is along the x, y, and z axes of the WCS.

  Signature `SetTwoDiagonalPoints(originPoint, cornerPoint)`

  Parameters:

  - originPoint (`NXOpen.Point3d`) – Block origin point
  - cornerPoint (`NXOpen.Point3d`) – Block corner point, diagonal from the block origin point

  New in version NX3.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR features_modeling (“FEATURES MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

## SetTwoPointsAndHeight

`BlockFeatureBuilder.``SetTwoPointsAndHeight`

  Create a block by setting the block height and two diagonal points in the WCS x-y plane.

  The orientation of the block is along the x, y, and z axes of the WCS.

  Signature `SetTwoPointsAndHeight(originPoint, cornerPoint, heightExpression)`

  Parameters:

  - originPoint (`NXOpen.Point3d`) – Block origin point
  - cornerPoint (`NXOpen.Point3d`) – Block 2d corner point, diagonal in WCS x-y plane from the block origin point.
  - heightExpression (str) – Block height in the WCS z direction

  New in version NX3.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR features_modeling (“FEATURES MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

## SetWidth

`BlockFeatureBuilder.``SetWidth`

  The expression representing the block width.

  Signature `SetWidth(width)`

  Parameters: | width (str) –

  New in version NX4.0.0.

  License requirements: solid_modeling (“SOLIDS MODELING”) OR cam_base (“CAM BASE”) OR insp_programming (“INSPECTION PROGRAMMING”)

## Validate

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