BulkReplacementBuilder Class — NXOpen Python API Reference 12.0.0 documentation

# BulkReplacementBuilder Class

class `NXOpen.Routing.``BulkReplacementBuilder`

  Bases: `NXOpen.Builder`

  Builder class for Bulk Replacement which manages replacement operations on Routing objects

  Not support KF.

  New in version NX12.0.0.

# Properties

Property | Description
--- | ---
ReferenceObject | Returns the reference object used to extract characteristics for Bulk Replacement
RouteObjectCollector | Returns the Routing object collector
Tag | Returns the Tag for this object.

# Methods

Method | Description
--- | ---
ClearAttributeForAllObjects | The attribute value clear method for all objects
ClearAttributeForObject | The object attribute value clear method
Commit | Commits any edits that have been applied to the builder.
CopySearchResultsToObject | The method that copies the search results from one object to another
Destroy | Deletes the builder, and cleans up any objects created by the builder.
GetAttributeForObject | The object attribute value method getter
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.
GetPartLayer | The method that gets the layer used for newly replaced objects
GetPartLibraryValuesForAttributeForObject | The method gets the part libray values for a given attribute for the specified object
GetPartReferenceSet | The method that gets the reference set used for newly replaced objects
GetReplacementMethodForObject | The replacement method getter
GetReplacementObjectIdentifierForObject | The replacement object identifier getter
GetReplacementObjectIdentifiersFromSearchResultsForObject | The possible replacement object identifiers method getter
GetRetainReasonForObject | The retain reason getter
GetSelectedObjectValuesForAttribute | The method that retrieves all the values for a given attribute from all the objects
GetValueForAttributeFromReferenceObject | The method that returns the value of an attribute from the reference object
SearchForReplacementForObject | The method that initiates a search for the replacement object
SearchForReplacementForObjectOnAttributes | The method that initiates a search for the replacement object using on the passed in attributes as criteria
SetAttributeForAllObjects | The attribute value setter for all objects
SetAttributeForObject | The object attribute value method setter
SetAttributeValueForObjectFromReferenceObject | The method that sets the attribute value from the reference object on the specifiec object
SetPartLayer | The method that sets the layer used for newly replaced objects
SetPartReferenceSet | The method that sets the reference set used for newly replaced objects
SetReplacementClassificationObjectForObject | The replacement object method setter
SetReplacementMethodForAllObjects | The replacement method setter for all objects
SetReplacementMethodForObject | The replacement method setter
SetReplacementObjectIdentifierForObject | The replacement object identifier method setter
SetReplacementPartSpecificationForObject | The replacement part specification method setter
SetSequenceOfObjectReplacement | The method that sets the sequence of object replacement
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.

# Property Detail

## ReferenceObject

`BulkReplacementBuilder.``ReferenceObject`

  Returns the reference object used to extract characteristics for Bulk Replacement

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

  Getter Method

  Signature `ReferenceObject`

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

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## RouteObjectCollector

`BulkReplacementBuilder.``RouteObjectCollector`

  Returns the Routing object collector

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

  Getter Method

  Signature `RouteObjectCollector`

  Returns: |
  Return type: | `NXOpen.Routing.RouteObjectCollector`

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

# Method Detail

## ClearAttributeForAllObjects

`BulkReplacementBuilder.``ClearAttributeForAllObjects`

  The attribute value clear method for all objects

  Signature `ClearAttributeForAllObjects(attributeIdType, attributeId)`

  Parameters:

  - attributeIdType (`NXOpen.Routing.RoutingAttributeIdentifierType`) – The type of attribute being cleared
  - attributeId (str) – The identifier of the attribute value being cleared

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## ClearAttributeForObject

`BulkReplacementBuilder.``ClearAttributeForObject`

  The object attribute value clear method

  Signature `ClearAttributeForObject(objectTag, attributeIdType, attributeId)`

  Parameters:

  - objectTag (`NXOpen.NXObject`) – The object for which to clear the attribute value
  - attributeIdType (`NXOpen.Routing.RoutingAttributeIdentifierType`) – The type of attribute being cleared
  - attributeId (str) – The identifier of the attribute value being cleared

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## CopySearchResultsToObject

`BulkReplacementBuilder.``CopySearchResultsToObject`

  The method that copies the search results from one object to another

  Signature `CopySearchResultsToObject(fromObjectTag, toObjectTag)`

  Parameters:

  - fromObjectTag (`NXOpen.NXObject`) – The object from which you want to copy the search results
  - toObjectTag (`NXOpen.NXObject`) – The object to which you want to copy the search results

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## GetAttributeForObject

`BulkReplacementBuilder.``GetAttributeForObject`

  The object attribute value method getter

  Signature `GetAttributeForObject(objectTag, attributeIdType, attributeId)`

  Parameters:

  - objectTag (`NXOpen.NXObject`) – The object for which to get the attribute value
  - attributeIdType (`NXOpen.Routing.RoutingAttributeIdentifierType`) – The type of attribute being retrieved
  - attributeId (str) – The identifier of the attribute value being retrieved

  Returns: | The value of the attribute
  Return type: | str

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## GetPartLayer

`BulkReplacementBuilder.``GetPartLayer`

  The method that gets the layer used for newly replaced objects

  Signature `GetPartLayer()`

  Returns: | The number of the layer
  Return type: | int

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## GetPartLibraryValuesForAttributeForObject

`BulkReplacementBuilder.``GetPartLibraryValuesForAttributeForObject`

  The method gets the part libray values for a given attribute for the specified object

  Signature `GetPartLibraryValuesForAttributeForObject(objectTag, attributeIdType, attributeId)`

  Parameters:

  - objectTag (`NXOpen.NXObject`) – The object for which to get the part library values
  - attributeIdType (`NXOpen.Routing.RoutingAttributeIdentifierType`) – The type of attribute for which to get the values
  - attributeId (str) – The identifier of the attribute for which to get the values

  Returns: | The values retrieved from all the part library for the attribute
  Return type: | list of str

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## GetPartReferenceSet

`BulkReplacementBuilder.``GetPartReferenceSet`

  The method that gets the reference set used for newly replaced objects

  Signature `GetPartReferenceSet()`

  Returns: | The name of the reference set
  Return type: | str

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## GetReplacementMethodForObject

`BulkReplacementBuilder.``GetReplacementMethodForObject`

  The replacement method getter

  Signature `GetReplacementMethodForObject(objectTag)`

  Parameters: | objectTag (`NXOpen.NXObject`) – The object for which to get the replacement method
  Returns: | The replacement method currently set for this object
  Return type: | `NXOpen.Routing.RoutingBulkReplacementBuilderReplacementMethodType`

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## GetReplacementObjectIdentifierForObject

`BulkReplacementBuilder.``GetReplacementObjectIdentifierForObject`

  The replacement object identifier getter

  Signature `GetReplacementObjectIdentifierForObject(objectTag)`

  Parameters: | objectTag (`NXOpen.NXObject`) – The object for which to get the replacement object
  Returns: | The object identifier for which is currently set as the replacement object
  Return type: | str

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## GetReplacementObjectIdentifiersFromSearchResultsForObject

`BulkReplacementBuilder.``GetReplacementObjectIdentifiersFromSearchResultsForObject`

  The possible replacement object identifiers method getter

  Signature `GetReplacementObjectIdentifiersFromSearchResultsForObject(objectTag)`

  Parameters: | objectTag (`NXOpen.NXObject`) – The object for which to get the possible replacement object identifiers
  Returns: | array of object identifiers which are possible replacement objects
  Return type: | list of str

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## GetRetainReasonForObject

`BulkReplacementBuilder.``GetRetainReasonForObject`

  The retain reason getter

  Signature `GetRetainReasonForObject(objectTag)`

  Parameters: | objectTag (`NXOpen.NXObject`) – The object for which to get the retain reason
  Returns: | The retain reason currently set for this object
  Return type: | `NXOpen.Routing.RoutingBulkReplacementBuilderRetainReasonType`

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## GetSelectedObjectValuesForAttribute

`BulkReplacementBuilder.``GetSelectedObjectValuesForAttribute`

  The method that retrieves all the values for a given attribute from all the objects

  Signature `GetSelectedObjectValuesForAttribute(attributeIdType, attributeId)`

  Parameters:

  - attributeIdType (`NXOpen.Routing.RoutingAttributeIdentifierType`) – The type of attribute for which to get all the values
  - attributeId (str) – The identifier of the attribute for which to get all the values

  Returns: | The values retrieved from all the objects for the attribute
  Return type: | list of str

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## GetValueForAttributeFromReferenceObject

`BulkReplacementBuilder.``GetValueForAttributeFromReferenceObject`

  The method that returns the value of an attribute from the reference object

  Signature `GetValueForAttributeFromReferenceObject(attributeIdType, attributeId)`

  Parameters:

  - attributeIdType (`NXOpen.Routing.RoutingAttributeIdentifierType`) – The type of attribute for which to get the value
  - attributeId (str) – The identifier of the attribute for which to get all the values

  Returns: | The value of the attribute from the reference object
  Return type: | str

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## SearchForReplacementForObject

`BulkReplacementBuilder.``SearchForReplacementForObject`

  The method that initiates a search for the replacement object

  Signature `SearchForReplacementForObject(objectTag)`

  Parameters: | objectTag (`NXOpen.NXObject`) – The object for which to initiate the search

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## SearchForReplacementForObjectOnAttributes

`BulkReplacementBuilder.``SearchForReplacementForObjectOnAttributes`

  The method that initiates a search for the replacement object using on the passed in attributes as criteria

  Signature `SearchForReplacementForObjectOnAttributes(objectTag, attributeIdTypes, attributeIds)`

  Parameters:

  - objectTag (`NXOpen.NXObject`) – The object for which to initiate the search
  - attributeIdTypes (list of `NXOpen.Routing.RoutingAttributeIdentifierType`) – The array of attribute types to limit the search
  - attributeIds (list of str) – The array of attribute identifiers to limit the search

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## SetAttributeForAllObjects

`BulkReplacementBuilder.``SetAttributeForAllObjects`

  The attribute value setter for all objects

  Signature `SetAttributeForAllObjects(attributeIdType, attributeId, value)`

  Parameters:

  - attributeIdType (`NXOpen.Routing.RoutingAttributeIdentifierType`) – The type of attribute value being set
  - attributeId (str) – The identifier of the attribute value being set
  - value (str) – The new value for the attribute

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## SetAttributeForObject

`BulkReplacementBuilder.``SetAttributeForObject`

  The object attribute value method setter

  Signature `SetAttributeForObject(objectTag, attributeIdType, attributeId, value)`

  Parameters:

  - objectTag (`NXOpen.NXObject`) – The object for which to set the attribute value
  - attributeIdType (`NXOpen.Routing.RoutingAttributeIdentifierType`) – The type of attribute being set
  - attributeId (str) – The identifier of the attribute being set
  - value (str) – The new value for the attribute

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## SetAttributeValueForObjectFromReferenceObject

`BulkReplacementBuilder.``SetAttributeValueForObjectFromReferenceObject`

  The method that sets the attribute value from the reference object on the specifiec object

  Signature `SetAttributeValueForObjectFromReferenceObject(objectTag, attributeIdType, attributeId)`

  Parameters:

  - objectTag (`NXOpen.NXObject`) – The object for which to set the attribute value from the reference object
  - attributeIdType (`NXOpen.Routing.RoutingAttributeIdentifierType`) – The type of attribute for which to set the value from the reference object
  - attributeId (str) – The identifier of the attribute for which to set the value from the reference object

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## SetPartLayer

`BulkReplacementBuilder.``SetPartLayer`

  The method that sets the layer used for newly replaced objects

  Signature `SetPartLayer(layer)`

  Parameters: | layer (int) – The number of the layer

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## SetPartReferenceSet

`BulkReplacementBuilder.``SetPartReferenceSet`

  The method that sets the reference set used for newly replaced objects

  Signature `SetPartReferenceSet(referenceSetName)`

  Parameters: | referenceSetName (str) – The name of the reference set

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## SetReplacementClassificationObjectForObject

`BulkReplacementBuilder.``SetReplacementClassificationObjectForObject`

  The replacement object method setter

  Signature `SetReplacementClassificationObjectForObject(objectTag, classificationClassId, classificationInstanceId)`

  Parameters:

  - objectTag (`NXOpen.NXObject`) – The object for which to set the replacement object
  - classificationClassId (str) – The classification object class id of the object to to set as the replacement object
  - classificationInstanceId (str) – The classification object instance id of the object to to set as the replacement object

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## SetReplacementMethodForAllObjects

`BulkReplacementBuilder.``SetReplacementMethodForAllObjects`

  The replacement method setter for all objects

  Signature `SetReplacementMethodForAllObjects(method)`

  Parameters: | method (`NXOpen.Routing.RoutingBulkReplacementBuilderReplacementMethodType`) – The replacement method to set for all objects

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## SetReplacementMethodForObject

`BulkReplacementBuilder.``SetReplacementMethodForObject`

  The replacement method setter

  Signature `SetReplacementMethodForObject(objectTag, method)`

  Parameters:

  - objectTag (`NXOpen.NXObject`) – The object for which to set the replacement method
  - method (`NXOpen.Routing.RoutingBulkReplacementBuilderReplacementMethodType`) – The replacement method to use for replacement of this object

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## SetReplacementObjectIdentifierForObject

`BulkReplacementBuilder.``SetReplacementObjectIdentifierForObject`

  The replacement object identifier method setter

  Signature `SetReplacementObjectIdentifierForObject(objectTag, objectIdentifier)`

  Parameters:

  - objectTag (`NXOpen.NXObject`) – The object for which to set the replacement object
  - objectIdentifier (str) – The object identifier for which to set as the replacement object

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## SetReplacementPartSpecificationForObject

`BulkReplacementBuilder.``SetReplacementPartSpecificationForObject`

  The replacement part specification method setter

  Signature `SetReplacementPartSpecificationForObject(objectTag, partSpecification)`

  Parameters:

  - objectTag (`NXOpen.NXObject`) – The object for which to set the replacement object
  - partSpecification (str) – The full part specification of the part to use for replacement

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## SetSequenceOfObjectReplacement

`BulkReplacementBuilder.``SetSequenceOfObjectReplacement`

  The method that sets the sequence of object replacement

  Signature `SetSequenceOfObjectReplacement(objects)`

  Parameters: | objects (list of `NXOpen.NXObject`) – The objects in the order of them to be replaced

  New in version NX12.0.0.

  License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)

## Validate

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