PlacementSolutionsBuilder Class

class NXOpen.Routing.PlacementSolutionsBuilder

Bases: NXOpen.Builder

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

New in version NX7.5.0.

Properties

Property Description
Tag Returns the Tag for this object.

Methods

Method Description
ApplyConstraintsAndClear Commit the solution and apply constraints if needed.
ApplyPortRotation Applies a rotation to the component about the axis of the port being used for placement.
Commit Commits any edits that have been applied to the builder.
Destroy Deletes the builder, and cleans up any objects created by the builder.
FirstSolution Cycle to the first solution.
GetCommittedObjects For builders that create more than one object, this method returns the objects that are created by commit.
GetConsiderPorts Returns false if the first placement solution maintains the origin and orientation of the original component.
GetLookForAdditionalPlacementSolutions Is Place Part looking for additional placement solutions? Used for Maintain Origin and Orientation replacement.
GetNumberOfSolutions Returns the total number of solutions based on the placement object.
GetObject Returns the object currently being edited by this builder.
GetOnlyPrimaryPlacementSolutions Is Place Part only considering the primary placement solutions?
GetSolutionIndex Returns the current index of the solution.
InitializePlacementData Initialize Placement Data
NextSolution Cycle to the next solution.
PreviousSolution Cycle to the previous solution
SetConsiderPorts Set to false to include a placement solution maintaining the origin and orientation of the component being replaced.
SetLookForAdditionalPlacementSolutions Set to true to look for additional placement solutions.
SetOnlyPrimaryPlacementSolutions True tells Place Part to only consider the primary placement solutions.
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.

Method Detail

ApplyConstraintsAndClear

PlacementSolutionsBuilder.ApplyConstraintsAndClear

Overloaded method ApplyConstraintsAndClear

  • ApplyConstraintsAndClear()
  • ApplyConstraintsAndClear(lockEngagement, lockRotation)
  • ApplyConstraintsAndClear(lockEngagement, lockRotation, fixPart)

-------------------------------------

Commit the solution and apply constraints if needed.

Signature ApplyConstraintsAndClear()

New in version NX7.5.0.

License requirements: routing_base (“Routing Basic”)

-------------------------------------

Commit the solution and apply constraints if needed.

Signature ApplyConstraintsAndClear(lockEngagement, lockRotation)

Parameters:
  • lockEngagement (bool) – Lock engagement if applicable.
  • lockRotation (bool) – Lock Rotation if applicable.

New in version NX7.5.0.

License requirements: routing_base (“Routing Basic”)

-------------------------------------

Commit the solution and apply constraints if needed.

Signature ApplyConstraintsAndClear(lockEngagement, lockRotation, fixPart)

Parameters:
  • lockEngagement (bool) – Lock engagement if applicable.
  • lockRotation (bool) – Lock Rotation if applicable.
  • fixPart (bool) – Fix Part if applicable.

New in version NX7.5.2.

License requirements: routing_base (“Routing Basic”)

-------------------------------------

ApplyPortRotation

PlacementSolutionsBuilder.ApplyPortRotation

Applies a rotation to the component about the axis of the port being used for placement.

Signature ApplyPortRotation(angle)

Parameters:angle (float) – Angle to apply.

New in version NX7.5.2.

License requirements: routing_base (“Routing Basic”)

FirstSolution

PlacementSolutionsBuilder.FirstSolution

Cycle to the first solution.

Signature FirstSolution()

New in version NX7.5.0.

License requirements: routing_base (“Routing Basic”)

GetConsiderPorts

PlacementSolutionsBuilder.GetConsiderPorts

Returns false if the first placement solution maintains the origin and orientation of the original component.

Signature GetConsiderPorts()

Returns:Are ports to be considered when finding the first placement solution?
Return type:bool

New in version NX10.3.0.

License requirements: routing_base (“Routing Basic”)

GetLookForAdditionalPlacementSolutions

PlacementSolutionsBuilder.GetLookForAdditionalPlacementSolutions

Is Place Part looking for additional placement solutions? Used for Maintain Origin and Orientation replacement.

Signature GetLookForAdditionalPlacementSolutions()

Returns:Are additional placement solutions to be found?
Return type:bool

New in version NX11.0.1.

License requirements: routing_base (“Routing Basic”)

GetNumberOfSolutions

PlacementSolutionsBuilder.GetNumberOfSolutions

Returns the total number of solutions based on the placement object.

Signature GetNumberOfSolutions()

Returns:
Return type:int

New in version NX8.5.3.

License requirements: routing_base (“Routing Basic”)

GetOnlyPrimaryPlacementSolutions

PlacementSolutionsBuilder.GetOnlyPrimaryPlacementSolutions

Is Place Part only considering the primary placement solutions?

Signature GetOnlyPrimaryPlacementSolutions()

Returns:Are only the primary placement solutions to be found?
Return type:bool

New in version NX11.0.1.

License requirements: routing_base (“Routing Basic”)

GetSolutionIndex

PlacementSolutionsBuilder.GetSolutionIndex

Returns the current index of the solution.

For example, index 1 of 10 solutions.

Signature GetSolutionIndex()

Returns:
Return type:int

New in version NX8.5.3.

License requirements: routing_base (“Routing Basic”)

InitializePlacementData

PlacementSolutionsBuilder.InitializePlacementData

Initialize Placement Data

Signature InitializePlacementData(part, placementPos, partToPlace)

Parameters:

New in version NX7.5.0.

License requirements: routing_base (“Routing Basic”)

NextSolution

PlacementSolutionsBuilder.NextSolution

Cycle to the next solution.

Signature NextSolution()

New in version NX7.5.0.

License requirements: routing_base (“Routing Basic”)

PreviousSolution

PlacementSolutionsBuilder.PreviousSolution

Cycle to the previous solution

Signature PreviousSolution()

New in version NX7.5.0.

License requirements: routing_base (“Routing Basic”)

SetConsiderPorts

PlacementSolutionsBuilder.SetConsiderPorts

Set to false to include a placement solution maintaining the origin and orientation of the component being replaced.

This solution, where ports are not considered in the calculation, will be the first solution.

Signature SetConsiderPorts(considerPorts)

Parameters:considerPorts (bool) – Are ports to be considered when finding the first placement solution?

New in version NX10.3.0.

License requirements: routing_base (“Routing Basic”)

SetLookForAdditionalPlacementSolutions

PlacementSolutionsBuilder.SetLookForAdditionalPlacementSolutions

Set to true to look for additional placement solutions.

Used for Maintain Origin and Orientation replacement.

Signature SetLookForAdditionalPlacementSolutions(lookForAdditionalPlacementSolutions)

Parameters:lookForAdditionalPlacementSolutions (bool) – Are additional placement solutions to be found?

New in version NX11.0.1.

License requirements: routing_base (“Routing Basic”)

SetOnlyPrimaryPlacementSolutions

PlacementSolutionsBuilder.SetOnlyPrimaryPlacementSolutions

True tells Place Part to only consider the primary placement solutions.

Signature SetOnlyPrimaryPlacementSolutions(onlyPrimaryPlacementSolutions)

Parameters:onlyPrimaryPlacementSolutions (bool) – Are only the primary placement solutions to be found?

New in version NX11.0.1.

License requirements: routing_base (“Routing Basic”)

Validate

PlacementSolutionsBuilder.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.