ObjectBuilder Class — NXOpen Python API Reference 12.0.0 documentation

# ObjectBuilder Class

class `NXOpen.Assemblies.ProductInterface.``ObjectBuilder`

  Bases: `NXOpen.Builder`

  Represents a Product Interface Object Builder.

  It creates a set of product interface objects To create a new instance of this class, use `NXOpen.Assemblies.ProductInterface.Collection.CreateObjectBuilderWithVersion()`

  Default values.

  Property | Value
  --- | ---
  PartGeometryCopy.ObjectType | BodyCollector

  New in version NX5.0.0.

# Properties

Property | Description
--- | ---
MateSetting | Returns or sets the current rule setting for use during creation of mating conditions
PartGeometryCopy | Returns the part geometry copy
Tag | Returns the Tag for this object.
WaveSetting | Returns or sets the current rule setting for use during creation of WAVE geomtery and interpart expressions

# Methods

Method | Description
--- | ---
AddProductInterface | Adds an object to the product interface; currently supported types are expressions and geometry.
AddProductInterfaceObject | Adds an object to the product interface; currently supported types are expressions and geometry
AddProductInterfaceObject1 | Adds an object to the product interface; currently supported types are expressions and geometry
AddProductInterfaceObject2 | Adds an object to the product interface; currently supported types are expressions and geometry.
Commit | Commits any edits that have been applied to the builder.
Destroy | Deletes the builder, and cleans up any objects created by the builder.
EditProductInterfaceObject | Edits a product interface object
EditProductInterfaceObject1 | Edits a product interface object with interface object type .
GetBuilderVersion | Gets the version of this 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.
QueryProductInterfaceObjects | Returns a list of product interface objects in the part
RemoveProductInterfaceObject | Removes an object from the product interface; currently supported types are expressions and geometry
SetBuilderVersion | Sets the version of this builder.
SetUserComments | Sets the user comments on the product interface item passed in
ShowResults | Updates the model to reflect the result of an edit to the model for all builders that support showing results.
UpdateAttributesFromPart | Updates the attributes of the product interface items in the part
Validate | Validate whether the inputs to the component are sufficient for commit to be called.

# Enumerations

ObjectBuilderBuilderVersion Enumeration | Version number of product interface builder
ObjectBuilderMate Enumeration | An enum representing the settings available for rule checking during creation of mating conditions
ObjectBuilderWave Enumeration | An enum representing settings available for rule checking during creation of WAVE geomtery and interpart expressions

# Property Detail

## MateSetting

`ObjectBuilder.``MateSetting`

  Returns or sets the current rule setting for use during creation of mating conditions

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

  Getter Method

  Signature `MateSetting`

  Returns: |
  Return type: | `NXOpen.Assemblies.ProductInterface.ObjectBuilderMate`

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `MateSetting`

  Parameters: | mateSetting (`NXOpen.Assemblies.ProductInterface.ObjectBuilderMate`) –

  New in version NX5.0.0.

  License requirements: None.

## PartGeometryCopy

`ObjectBuilder.``PartGeometryCopy`

  Returns the part geometry copy

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

  Getter Method

  Signature `PartGeometryCopy`

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

  New in version NX9.0.0.

  License requirements: None.

## WaveSetting

`ObjectBuilder.``WaveSetting`

  Returns or sets the current rule setting for use during creation of WAVE geomtery and interpart expressions

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

  Getter Method

  Signature `WaveSetting`

  Returns: |
  Return type: | `NXOpen.Assemblies.ProductInterface.ObjectBuilderWave`

  New in version NX5.0.0.

  License requirements: None.

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

  Setter Method

  Signature `WaveSetting`

  Parameters: | waveSetting (`NXOpen.Assemblies.ProductInterface.ObjectBuilderWave`) –

  New in version NX5.0.0.

  License requirements: None.

# Method Detail

## AddProductInterface

`ObjectBuilder.``AddProductInterface`

  Adds an object to the product interface; currently supported types are expressions and geometry.

  If the object already exists, it becomes active.

  Signature `AddProductInterface(nxItem)`

  Parameters: | nxItem (`NXOpen.NXObject`) – nx item to be added to the product interface
  Returns: | a tuple
  Return type: | A tuple consisting of (prodIntItem, alreadyExisted). prodIntItem is a `NXOpen.Assemblies.ProductInterface.InterfaceObject`. the product interface object created or modified alreadyExisted is a bool.

  New in version NX8.5.1.

  License requirements: None.

## AddProductInterfaceObject

`ObjectBuilder.``AddProductInterfaceObject`

  Adds an object to the product interface; currently supported types are expressions and geometry

  Signature `AddProductInterfaceObject(nxItem)`

  Parameters: | nxItem (`NXOpen.NXObject`) – nx item to be added to the product interface
  Returns: | the product interface object created
  Return type: | `NXOpen.Assemblies.ProductInterface.InterfaceObject`

  New in version NX5.0.0.

  License requirements: None.

## AddProductInterfaceObject1

`ObjectBuilder.``AddProductInterfaceObject1`

  Adds an object to the product interface; currently supported types are expressions and geometry

  Signature `AddProductInterfaceObject1(nxObject, name, description, reverseDirection)`

  Parameters:

  - nxObject (`NXOpen.NXObject`) – Selected object to add
  - name (str) – User defined name of selected object
  - description (str) – User comments of selected object
  - reverseDirection (bool) – Flag to specify whether to reverse the direction of the source object

  Returns: | the product interface object created
  Return type: | `NXOpen.Assemblies.ProductInterface.InterfaceObject`

  New in version NX9.0.0.

  License requirements: None.

## AddProductInterfaceObject2

`ObjectBuilder.``AddProductInterfaceObject2`

  Adds an object to the product interface; currently supported types are expressions and geometry.

  Interface Usage type can be set using this API.

  Signature `AddProductInterfaceObject2(nxObject, name, description, reverseDirection, interfaceUsageType)`

  Parameters:

  - nxObject (`NXOpen.NXObject`) – Selected object to add
  - name (str) – User defined name of selected object
  - description (str) – User comments of selected object
  - reverseDirection (bool) – Flag to specify whether to reverse the direction of the source object
  - interfaceUsageType (`NXOpen.Assemblies.ProductInterface.InterfaceObjectInterfaceUsageType`) – Usage type of product interface object

  Returns: | the product interface object created
  Return type: | `NXOpen.Assemblies.ProductInterface.InterfaceObject`

  New in version NX12.0.0.

  License requirements: None.

## EditProductInterfaceObject

`ObjectBuilder.``EditProductInterfaceObject`

  Edits a product interface object

  Signature `EditProductInterfaceObject(productInterface, nxObject, name, description, reverseDirection)`

  Parameters:

  - productInterface (`NXOpen.Assemblies.ProductInterface.InterfaceObject`) – Product interface object to be edited
  - nxObject (`NXOpen.NXObject`) – Selected object to add
  - name (str) – User defined name of selected object
  - description (str) – User comments of selected object
  - reverseDirection (bool) – Flag to specify whether to reverse the direction of the source object

  New in version NX9.0.0.

  License requirements: None.

## EditProductInterfaceObject1

`ObjectBuilder.``EditProductInterfaceObject1`

  Edits a product interface object with interface object type .

  Interface Usage type can be set using this API.

  Signature `EditProductInterfaceObject1(productInterface, nxObject, name, description, reverseDirection, interfaceUsageType)`

  Parameters:

  - productInterface (`NXOpen.Assemblies.ProductInterface.InterfaceObject`) – Product interface object to be edited
  - nxObject (`NXOpen.NXObject`) – Selected object to add
  - name (str) – User defined name of selected object
  - description (str) – User comments of selected object
  - reverseDirection (bool) – Flag to specify whether to reverse the direction of the source object
  - interfaceUsageType (`NXOpen.Assemblies.ProductInterface.InterfaceObjectInterfaceUsageType`) – Usage type of product interface object

  New in version NX12.0.0.

  License requirements: None.

## GetBuilderVersion

`ObjectBuilder.``GetBuilderVersion`

  Gets the version of this builder.

  Signature `GetBuilderVersion()`

  Returns: |
  Return type: | `NXOpen.Assemblies.ProductInterface.ObjectBuilderBuilderVersion`

  New in version NX9.0.0.

  License requirements: None.

## QueryProductInterfaceObjects

`ObjectBuilder.``QueryProductInterfaceObjects`

  Returns a list of product interface objects in the part

  Signature `QueryProductInterfaceObjects(part)`

  Parameters: | part (`NXOpen.NXObject`) – part whose product interface objects have to be queried
  Returns: | objects in the product interface
  Return type: | list of `NXOpen.Assemblies.ProductInterface.InterfaceObject`

  New in version NX5.0.0.

  License requirements: None.

## RemoveProductInterfaceObject

`ObjectBuilder.``RemoveProductInterfaceObject`

  Removes an object from the product interface; currently supported types are expressions and geometry

  Signature `RemoveProductInterfaceObject(prodIntItem)`

  Parameters: | prodIntItem (`NXOpen.Assemblies.ProductInterface.InterfaceObject`) – product interface object to be removed from the product interface set

  New in version NX5.0.0.

  License requirements: None.

## SetBuilderVersion

`ObjectBuilder.``SetBuilderVersion`

  Sets the version of this builder.

  Signature `SetBuilderVersion(version)`

  Parameters: | version (`NXOpen.Assemblies.ProductInterface.ObjectBuilderBuilderVersion`) –

  New in version NX9.0.0.

  License requirements: None.

## SetUserComments

`ObjectBuilder.``SetUserComments`

  Sets the user comments on the product interface item passed in

  Signature `SetUserComments(prodIntItem, userComments)`

  Parameters:

  - prodIntItem (`NXOpen.Assemblies.ProductInterface.InterfaceObject`) – product interface item on which the user comments have to set
  - userComments (str) – user comments to be set on specified product interface item

  New in version NX5.0.0.

  License requirements: None.

## UpdateAttributesFromPart

`ObjectBuilder.``UpdateAttributesFromPart`

  Updates the attributes of the product interface items in the part

  Signature `UpdateAttributesFromPart(part)`

  Parameters: | part (`NXOpen.NXObject`) – part, product interface objects of which need to have their attributes updated

  New in version NX5.0.0.

  License requirements: None.

## Validate

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