PlacePartBuilder Class — NXOpen Python API Reference 12.0.0 documentation

# PlacePartBuilder Class

class `NXOpen.Routing.``PlacePartBuilder`

  Bases: `NXOpen.Builder`

  To create a new instance of this class, use `NXOpen.Routing.RouteManager.CreatePlacePartBuilderPTS()`

  New in version NX7.5.0.

# Properties

Property | Description
--- | ---
Tag | Returns the Tag for this object.

# 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.
FinalizePlacement | Complete the placement operation.
GetAddPartToActiveRunFlag | Determines whether part being placed has to be added in active run or not.
GetCommittedObjects | For builders that create more than one object, this method returns the objects that are created by commit.
GetLoadedPartInfo | Get information about the parts being placed.
GetObject | Returns the object currently being edited by this builder.
GetScrewSeatAlignmentVector | Gets the alignment vector, primary axis direction for a stock, reducer, elbow, etc.
GetScrewSeatAngle | Gets the angle expression to be used for screw seat placement along a placed object.
GetScrewSeatEnd | Gets the point from builder, used in final placement of screw seat.
GetScrewSeatIntersectionPoint | Gets information about the final screw seat position.
GetScrewSeatLength | Gets the length expression to be used for screw seat placement along a placed object.
LoadPart | Load a part given the input part number.
ReplaceLoadedInstance | Replace the builder’s part instance with a new instance.
SetActiveLayer | Set the layer for the loaded part.
SetActiveRefSet | Set the reference set to use for the loaded part.
SetAddPartToActiveRunFlag | Set a flag which tells the builder whether the part being placed will be added in active run or not.
SetAttributeHolder | Sets Attribute holder in builder, which is user for template attribute assignment.
SetConsiderPorts | Set a flag which will inform the placement solutions builder to consider ports when computing placement solutions during a replace part operation.
SetItemSelection | Set a flag which tells the builder from where the part being placed was selected and the tag of the selected part.
SetLoadedPartInfo | Get information about the parts being placed.
SetPlacePartOperation | Set a flag which tells the builder whether the part being placed is replacing an existing part in the assembly.
SetScrewSeatAlignmentVector | Sets the alignment vector, primary axis direction for a stock, reducer, elbow, etc.
SetScrewSeatEnd | Sets a point in builder, which is required for final placement of screw seat.
SetScrewSeatIntersectionPoint | Sets the final position of screw seat.
SetScrewSeatPlacement | Sets the input parameters to be used for measurement holder screw seats.
ShowResults | Updates the model to reflect the result of an edit to the model for all builders that support showing results.
UnloadPart | Update the loaded part with a new placement location and object.
UpdatePlacementObj | Update the loaded part with a new placement location and object.
UpdateRoutingTemplateAttributes | Updates the Routing Template Attributes to AttributeHolder
Validate | Validate whether the inputs to the component are sufficient for commit to be called.

# Method Detail

## FinalizePlacement

`PlacePartBuilder.``FinalizePlacement`

  Complete the placement operation.

  Signature `FinalizePlacement(optionalCharx, requiredCharx, name, layerOption, layer, dfaultOStock)`

  Parameters:

  - optionalCharx (`NXOpen.Routing.CharacteristicList`) – Optional Charx to apply.
  - requiredCharx (`NXOpen.Routing.CharacteristicList`) – Required Charx to apply.
  - name (str) – The component name to apply to the part.
  - layerOption (int) – The layer option.
  - layer (int) – The layer to apply.
  - dfaultOStock (bool) – Assign overstock to a fitting when a default is defined.

  New in version NX7.5.0.

  License requirements: routing_base (“Routing Basic”)

## GetAddPartToActiveRunFlag

`PlacePartBuilder.``GetAddPartToActiveRunFlag`

  Determines whether part being placed has to be added in active run or not.

  Signature `GetAddPartToActiveRunFlag()`

  Returns: |
  Return type: | bool

  New in version NX10.0.0.

  License requirements: routing_base (“Routing Basic”)

## GetLoadedPartInfo

`PlacePartBuilder.``GetLoadedPartInfo`

  Get information about the parts being placed.

  Signature `GetLoadedPartInfo()`

  Returns: | a tuple
  Return type: | A tuple consisting of (loadedPart, loadedInst). loadedPart is a `NXOpen.TaggedObject`. The PART object of the loaded part. loadedInst is a `NXOpen.TaggedObject`. The Instance object of the loaded part.

  New in version NX7.5.0.

  License requirements: routing_base (“Routing Basic”)

## GetScrewSeatAlignmentVector

`PlacePartBuilder.``GetScrewSeatAlignmentVector`

  Gets the alignment vector, primary axis direction for a stock, reducer, elbow, etc.

  along the part the screw seat is placed to align the screw seat. Optional, otherwise an arbitrary vector will be constructed.

  Signature `GetScrewSeatAlignmentVector()`

  Returns: | The alignment vector along the part on which screw seat is placed.
  Return type: | `NXOpen.Vector3d`

  New in version NX10.0.0.

  License requirements: routing_base (“Routing Basic”)

## GetScrewSeatAngle

`PlacePartBuilder.``GetScrewSeatAngle`

  Gets the angle expression to be used for screw seat placement along a placed object.

  Signature `GetScrewSeatAngle()`

  Returns: | The angle used for screw seat placement on placed routing object.
  Return type: | `NXOpen.Expression`

  New in version NX10.0.0.

  License requirements: routing_base (“Routing Basic”)

## GetScrewSeatEnd

`PlacePartBuilder.``GetScrewSeatEnd`

  Gets the point from builder, used in final placement of screw seat.

  This point is used for creating segemnts / constraints when finally placing the screw seat.

  Signature `GetScrewSeatEnd()`

  Returns: | This is the internal point used in determining final position of screw seat placement.
  Return type: | `NXOpen.Point3d`

  New in version NX8.0.0.

  License requirements: routing_base (“Routing Basic”)

## GetScrewSeatIntersectionPoint

`PlacePartBuilder.``GetScrewSeatIntersectionPoint`

  Gets information about the final screw seat position.

  Signature `GetScrewSeatIntersectionPoint()`

  Returns: | The final position of screw seat placement.
  Return type: | `NXOpen.Point3d`

  New in version NX8.0.0.

  License requirements: routing_base (“Routing Basic”)

## GetScrewSeatLength

`PlacePartBuilder.``GetScrewSeatLength`

  Gets the length expression to be used for screw seat placement along a placed object.

  Signature `GetScrewSeatLength()`

  Returns: | The length used for screw seat placement on placed routing object.
  Return type: | `NXOpen.Expression`

  New in version NX10.0.0.

  License requirements: routing_base (“Routing Basic”)

## LoadPart

`PlacePartBuilder.``LoadPart`

  Overloaded method LoadPart

  - `LoadPart(partNumber)`
  - `LoadPart()`

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

  Load a part given the input part number.

  Signature `LoadPart(partNumber)`

  Parameters: | partNumber (str) – Part number

  New in version NX7.5.0.

  License requirements: routing_base (“Routing Basic”)

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

  Load the specified part.

  Signature `LoadPart()`

  New in version NX8.0.0.

  License requirements: routing_base (“Routing Basic”)

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

## ReplaceLoadedInstance

`PlacePartBuilder.``ReplaceLoadedInstance`

  Replace the builder’s part instance with a new instance.

  This is used when the assemblies absolute positioning method is used. It will create it’s own part instance and we need make sure the builder has the new one.

  Signature `ReplaceLoadedInstance(partInst)`

  Parameters: | partInst (`NXOpen.TaggedObject`) – The instance object of the loaded part.

  New in version NX7.5.0.

  License requirements: routing_base (“Routing Basic”)

## SetActiveLayer

`PlacePartBuilder.``SetActiveLayer`

  Set the layer for the loaded part.

  Signature `SetActiveLayer(layerOption, layer)`

  Parameters:

  - layerOption (int) – Layer Option
  - layer (int) – Layer Number

  New in version NX7.5.0.

  License requirements: routing_base (“Routing Basic”)

## SetActiveRefSet

`PlacePartBuilder.``SetActiveRefSet`

  Set the reference set to use for the loaded part.

  Signature `SetActiveRefSet(refSet)`

  Parameters: | refSet (str) – Reference Set Name

  New in version NX7.5.0.

  License requirements: routing_base (“Routing Basic”)

## SetAddPartToActiveRunFlag

`PlacePartBuilder.``SetAddPartToActiveRunFlag`

  Set a flag which tells the builder whether the part being placed will be added in active run or not.

  Signature `SetAddPartToActiveRunFlag(addPartToActiveRun)`

  Parameters: | addPartToActiveRun (bool) –

  New in version NX10.0.0.

  License requirements: routing_base (“Routing Basic”)

## SetAttributeHolder

`PlacePartBuilder.``SetAttributeHolder`

  Sets Attribute holder in builder, which is user for template attribute assignment.

  Signature `SetAttributeHolder(attributeHolder)`

  Parameters: | attributeHolder (`NXOpen.Routing.AttributeHolder`) – Object to hold template attributes

  New in version NX8.5.0.

  License requirements: routing_base (“Routing Basic”)

## SetConsiderPorts

`PlacePartBuilder.``SetConsiderPorts`

  Set a flag which will inform the placement solutions builder to consider ports when computing placement solutions during a replace part operation.

  Setting this to false implies that the first placement solution computed is to maintain the origin and orientation of the part being replaced. Setting this to true implies that the first placement solution computed is to maintain the location of the original part’s ports.

  Signature `SetConsiderPorts(considerPorts)`

  Parameters: | considerPorts (bool) –

  New in version NX11.0.1.

  License requirements: routing_base (“Routing Basic”)

## SetItemSelection

`PlacePartBuilder.``SetItemSelection`

  Set a flag which tells the builder from where the part being placed was selected and the tag of the selected part.

  Signature `SetItemSelection(itemSelectionMethod, selectedPartOcc)`

  Parameters:

  - itemSelectionMethod (int) – The enum representing the way of selection of part to be placed.
  - selectedPartOcc (`NXOpen.TaggedObject`) – The tag of the part occurrence selected from specify item dialog.

  New in version NX11.0.0.

  License requirements: routing_base (“Routing Basic”)

## SetLoadedPartInfo

`PlacePartBuilder.``SetLoadedPartInfo`

  Get information about the parts being placed.

  Signature `SetLoadedPartInfo(loadedPart, loadedInst)`

  Parameters:

  - loadedPart (`NXOpen.TaggedObject`) – The PART object of the loaded part.
  - loadedInst (`NXOpen.TaggedObject`) – The Instance object of the loaded part.

  New in version NX7.5.0.

  License requirements: routing_base (“Routing Basic”)

## SetPlacePartOperation

`PlacePartBuilder.``SetPlacePartOperation`

  Set a flag which tells the builder whether the part being placed is replacing an existing part in the assembly.

  Signature `SetPlacePartOperation(replacePart)`

  Parameters: | replacePart (bool) – True if replace part operation.

  New in version NX8.0.0.

  License requirements: routing_base (“Routing Basic”)

## SetScrewSeatAlignmentVector

`PlacePartBuilder.``SetScrewSeatAlignmentVector`

  Sets the alignment vector, primary axis direction for a stock, reducer, elbow, etc.

  along the part the screw seat is placed to align the screw seat. Optional, otherwise an arbitrary vector will be constructed.

  Signature `SetScrewSeatAlignmentVector(alignVector)`

  Parameters: | alignVector (`NXOpen.Vector3d`) – The alignment vector along the part on which screw seat is placed.

  New in version NX10.0.0.

  License requirements: routing_base (“Routing Basic”)

## SetScrewSeatEnd

`PlacePartBuilder.``SetScrewSeatEnd`

  Sets a point in builder, which is required for final placement of screw seat.

  This point is used for creating segments / constraints when finally placing the screw seat.

  Signature `SetScrewSeatEnd(point)`

  Parameters: | point (`NXOpen.Point3d`) – This is the internal point used in determining final position of screw seat placement.

  New in version NX8.0.0.

  License requirements: routing_base (“Routing Basic”)

## SetScrewSeatIntersectionPoint

`PlacePartBuilder.``SetScrewSeatIntersectionPoint`

  Sets the final position of screw seat.

  This is required in builder when doing finalize placement after (OK/Apply) .

  Signature `SetScrewSeatIntersectionPoint(intersectionPoint)`

  Parameters: | intersectionPoint (`NXOpen.Point3d`) – The final position of screw seat placement.

  New in version NX8.0.0.

  License requirements: routing_base (“Routing Basic”)

## SetScrewSeatPlacement

`PlacePartBuilder.``SetScrewSeatPlacement`

  Sets the input parameters to be used for measurement holder screw seats.

  Signature `SetScrewSeatPlacement(startLocation, endLocation, startPoint, endPoint, length, angle)`

  Parameters:

  - startLocation (`NXOpen.TaggedObject`) – The start port to determine screw seat placement.
  - endLocation (`NXOpen.TaggedObject`) – The end port to determine screw seat placement.
  - startPoint (`NXOpen.Point3d`) – The start position to determine screw seat placement.
  - endPoint (`NXOpen.Point3d`) – The end position to determine screw seat placement.
  - length (`NXOpen.Expression`) – The length along the axis to place screw seat.
  - angle (`NXOpen.Expression`) – The angle along the axis to place screw seat.

  New in version NX10.0.0.

  License requirements: routing_base (“Routing Basic”)

## UnloadPart

`PlacePartBuilder.``UnloadPart`

  Update the loaded part with a new placement location and object.

  Signature `UnloadPart()`

  New in version NX7.5.0.

  License requirements: routing_base (“Routing Basic”)

## UpdatePlacementObj

`PlacePartBuilder.``UpdatePlacementObj`

  Update the loaded part with a new placement location and object.

  Signature `UpdatePlacementObj(placementObj, placementPos)`

  Parameters:

  - placementObj (`NXOpen.TaggedObject`) – New object to attach to. Can bee NULL.
  - placementPos (`NXOpen.Point3d`) – The new location for the part.

  New in version NX7.5.0.

  License requirements: routing_base (“Routing Basic”)

## UpdateRoutingTemplateAttributes

`PlacePartBuilder.``UpdateRoutingTemplateAttributes`

  Updates the Routing Template Attributes to AttributeHolder

  Signature `UpdateRoutingTemplateAttributes()`

  New in version NX11.0.0.

  License requirements: routing_base (“Routing Basic”)

## Validate

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