PartPlacementBuilder Class¶
-
class
NXOpen.MechanicalRouting.
PartPlacementBuilder
¶ Bases:
NXOpen.Builder
Represents
NXOpen.MechanicalRouting.PartPlacementBuilder
.To create a new instance of this class, use
NXOpen.MechanicalRouting.BuilderFactory.CreatePartPlacementBuilder()
New in version NX11.0.0.
Properties¶
Property | Description |
---|---|
ComponentsToEditCollector | Returns the NXOpen.Routing.RouteObjectCollector that collects components to edit |
LogicalDesignObject | Returns or sets the mapping logical design object |
Tag | Returns the Tag for this object. |
Methods¶
Method | Description |
---|---|
AutoAssignAttributes | Auto assign the auto assignable attributes of all :py:class:`PDM.LogicalObject`s that were created during part placement operation. |
Commit | Commits any edits that have been applied to the builder. |
CommitThisPlacement | Commits the current placement operation. |
CreatePartOccurrenceToPlace | Creates the Assemblies.Component for part to place with given reference set and layer. |
Destroy | Deletes the builder, and cleans up any objects created by the builder. |
GetCoincidentPortForCompatibility | Get compatibility port from port of placed part (ex in case of Valve-Flange get corresponding coincident Flange port from Valve port) |
GetCommittedObjects | For builders that create more than one object, this method returns the objects that are created by commit. |
GetErrorCodeForPlacementSolution | Returns the error code for a placement solution. |
GetFilteredPlacementSolutions | Filters placement solutions based existing filtration flags in builder ex. |
GetLogicalObjects | Returns the :py:class:`PDM.LogicalObject`s that were created during part placement operation. |
GetLogicalObjectsHavingUnassignedRequiredAttributes | Returns the :py:class:`PDM.LogicalObject`s having unassigned non-auto-assignable required attributes. |
GetObject | Returns the object currently being edited by this builder. |
GetPortAtCutSideOfElbow | Get the port from cut side of cut elbow |
InitializePlacementEngineBuilder | Initializes the Placement Engine builder with input already present in the Part Placement Builder. |
LoadPart | Loads the BasePart to place. |
PreCommitThisPlacement | Pre commits the current placement operation to prepare data (ex. |
PrepareDataForConnectivity | Prepare data to build connectivity for all placed parts. |
ProcessCompatibilityPostPlaceParts | Process the compatibility post placement parts (ex. |
ProcessComponentsForEdit | Processes the :py:class:`Assemblies.Component`s to edit their placement |
ProcessPlacedPart | Processes the placed part. |
ProcessPostPlaceParts | Process the post placement parts (ex. |
RotatePlaceableObjectByAngle | Rotates the fitting by the specified angle along the plane perpendicular to the vector defined by the engaged port. |
SetAddUnconnectedEquipmentToActiveRunOption | Sets the option that determines whether a part positioned as Equipment should be added to the active Run |
SetClassificationObjectIdentifier | Sets the identifier of the classification object associated with the part to place |
SetClassificationObjectIdentifierOfCompatibilityPart | Sets the identifier of the classification object associated with the compatibility part to post place |
SetClassificationObjectIdentifierOfPartToPostPlace | Sets the identifier of the classification object associated with the part to be post placed. |
SetFileSpecificationOfPartToPlace | Sets the file specification of the part to place |
SetPortOfPlaceableObject | Sets the port for filtration from the part being placed. |
SetPositionAsOption | Sets the positioning option NXOpen.MechanicalRouting.PartPlacementBuilderPositionAsType on the builder. |
SetPrimarySolutionsFlag | Sets the primary solutions flag on builder. |
SetReferenceObjectForPlacement | Sets the reference object and reference location for placement. |
ShowResults | Updates the model to reflect the result of an edit to the model for all builders that support showing results. |
UpdateLayer | Updates the layer for the Design Elements created during part placement operation. |
UpdateReferenceSet | Updates the reference set for the Design Elements created during part placement operation. |
Validate | Validate whether the inputs to the component are sufficient for commit to be called. |
Enumerations¶
PartPlacementBuilderPlacementValidationStatus Enumeration | The placement validation status |
PartPlacementBuilderPositionAsType Enumeration | The positioning types |
Property Detail¶
ComponentsToEditCollector¶
-
PartPlacementBuilder.
ComponentsToEditCollector
¶ Returns the
NXOpen.Routing.RouteObjectCollector
that collects components to edit-------------------------------------
Getter Method
Signature
ComponentsToEditCollector
Returns: Return type: NXOpen.Routing.RouteObjectCollector
New in version NX12.0.0.
License requirements: routing_base (“Routing Basic”)
LogicalDesignObject¶
-
PartPlacementBuilder.
LogicalDesignObject
¶ Returns or sets the mapping logical design object
-------------------------------------
Getter Method
Signature
LogicalDesignObject
Returns: Return type: NXOpen.NXObject
New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Setter Method
Signature
LogicalDesignObject
Parameters: logicalDesignObject ( NXOpen.NXObject
) –New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
Method Detail¶
AutoAssignAttributes¶
CommitThisPlacement¶
-
PartPlacementBuilder.
CommitThisPlacement
¶ Commits the current placement operation.
This method must be called after calling method
MechanicalRouting.PartPlacementBuilder.PreCommitThisPlacement()
. This method returnsNXOpen.MechanicalRouting.PartPlacementBuilderPlacementValidationStatus
valueSignature
CommitThisPlacement()
Returns: Return type: NXOpen.MechanicalRouting.PartPlacementBuilderPlacementValidationStatus
New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
CreatePartOccurrenceToPlace¶
-
PartPlacementBuilder.
CreatePartOccurrenceToPlace
¶ Creates the
Assemblies.Component
for part to place with given reference set and layer.The created component will be used to generate placement solutions. Error will be raised if part to place is not loaded.
Signature
CreatePartOccurrenceToPlace(referenceSet, layer)
Parameters: - referenceSet (str) – reference set to apply on part occurrence
- layer (int) – layer
Returns: created part occurrence
Return type: New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
GetCoincidentPortForCompatibility¶
-
PartPlacementBuilder.
GetCoincidentPortForCompatibility
¶ Get compatibility port from port of placed part (ex in case of Valve-Flange get corresponding coincident Flange port from Valve port)
Signature
GetCoincidentPortForCompatibility(portFromPlacedPart)
Parameters: portFromPlacedPart ( NXOpen.Routing.Port
) –Returns: Other port at the intersection where compatible part needs to be placed. Return type: NXOpen.Routing.Port
New in version NX12.0.0.
License requirements: routing_base (“Routing Basic”)
GetErrorCodeForPlacementSolution¶
-
PartPlacementBuilder.
GetErrorCodeForPlacementSolution
¶ Returns the error code for a placement solution.
A non-zero error code may suggest whether there will be any design rule validation due to the given placement solution.
Signature
GetErrorCodeForPlacementSolution(placementSolution)
Parameters: placementSolution ( NXOpen.Placement.PlacementSolution
) –Returns: Return type: int New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
GetFilteredPlacementSolutions¶
-
PartPlacementBuilder.
GetFilteredPlacementSolutions
¶ Filters placement solutions based existing filtration flags in builder ex.
primary.
Signature
GetFilteredPlacementSolutions()
Returns: Return type: list of NXOpen.Placement.PlacementSolution
New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
GetLogicalObjects¶
-
PartPlacementBuilder.
GetLogicalObjects
¶ Returns the :py:class:`PDM.LogicalObject`s that were created during part placement operation.
Signature
GetLogicalObjects()
Returns: Return type: list of NXOpen.PDM.LogicalObject
New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
GetLogicalObjectsHavingUnassignedRequiredAttributes¶
-
PartPlacementBuilder.
GetLogicalObjectsHavingUnassignedRequiredAttributes
¶ Returns the :py:class:`PDM.LogicalObject`s having unassigned non-auto-assignable required attributes.
Signature
GetLogicalObjectsHavingUnassignedRequiredAttributes()
Returns: Return type: list of NXOpen.PDM.LogicalObject
New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
GetPortAtCutSideOfElbow¶
-
PartPlacementBuilder.
GetPortAtCutSideOfElbow
¶ Get the port from cut side of cut elbow
Signature
GetPortAtCutSideOfElbow()
Returns: Return type: NXOpen.Routing.Port
New in version NX12.0.0.
License requirements: routing_base (“Routing Basic”)
InitializePlacementEngineBuilder¶
-
PartPlacementBuilder.
InitializePlacementEngineBuilder
¶ Initializes the Placement Engine builder with input already present in the Part Placement Builder.
Signature
InitializePlacementEngineBuilder()
Returns: Return type: NXOpen.Placement.PlacementEngineBuilder
New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
LoadPart¶
-
PartPlacementBuilder.
LoadPart
¶ Loads the
BasePart
to place.Signature
LoadPart()
Returns: loaded part Return type: NXOpen.BasePart
New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
PreCommitThisPlacement¶
-
PartPlacementBuilder.
PreCommitThisPlacement
¶ Pre commits the current placement operation to prepare data (ex.
split stock, post placement, etc) for final commit. This method must be followed by a call to final commit method
MechanicalRouting.PartPlacementBuilder.CommitThisPlacement()
to complete the placement operationSignature
PreCommitThisPlacement()
New in version NX11.0.0.
Deprecated since version NX12.0.0: Use
MechanicalRouting.PartPlacementBuilder.ProcessPlacedPart()
followed byMechanicalRouting.PartPlacementBuilder.PrepareDataForConnectivity()
.License requirements: routing_base (“Routing Basic”)
PrepareDataForConnectivity¶
-
PartPlacementBuilder.
PrepareDataForConnectivity
¶ Prepare data to build connectivity for all placed parts.
Things like computation of new stock DE (resultant of splitting) will happen here. This method must be followed by a call to final commit method
MechanicalRouting.PartPlacementBuilder.CommitThisPlacement()
to complete the placement operationSignature
PrepareDataForConnectivity()
New in version NX12.0.0.
License requirements: routing_base (“Routing Basic”)
ProcessCompatibilityPostPlaceParts¶
-
PartPlacementBuilder.
ProcessCompatibilityPostPlaceParts
¶ Process the compatibility post placement parts (ex.
placement of gasket flange after the post placement of flange and do geoemtry operations like split stock, etc). This method will also prepare data needed to build connectivity (connectivity will be built in final commit).
Signature
ProcessCompatibilityPostPlaceParts()
Returns: Return type: list of NXOpen.Assemblies.Component
New in version NX12.0.0.
License requirements: routing_base (“Routing Basic”)
ProcessComponentsForEdit¶
ProcessPlacedPart¶
-
PartPlacementBuilder.
ProcessPlacedPart
¶ Processes the placed part.
This might split the target stock geometry. This method will also prepare data needed to build connectivity (connectivity will be built in final commit).
Signature
ProcessPlacedPart()
New in version NX12.0.0.
License requirements: routing_base (“Routing Basic”)
ProcessPostPlaceParts¶
-
PartPlacementBuilder.
ProcessPostPlaceParts
¶ Process the post placement parts (ex.
placement of flange after the valve and do geoemtry operations like split stock, etc). This method will also prepare data needed to build connectivity (connectivity will be built in final commit).
Signature
ProcessPostPlaceParts()
Returns: Return type: list of NXOpen.Assemblies.Component
New in version NX12.0.0.
License requirements: routing_base (“Routing Basic”)
RotatePlaceableObjectByAngle¶
-
PartPlacementBuilder.
RotatePlaceableObjectByAngle
¶ Rotates the fitting by the specified angle along the plane perpendicular to the vector defined by the engaged port.
Signature
RotatePlaceableObjectByAngle(rotationAngle)
Parameters: rotationAngle (float) – New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
SetAddUnconnectedEquipmentToActiveRunOption¶
-
PartPlacementBuilder.
SetAddUnconnectedEquipmentToActiveRunOption
¶ Sets the option that determines whether a part positioned as Equipment should be added to the active Run
Signature
SetAddUnconnectedEquipmentToActiveRunOption(canAddEquipmentToActiveRun)
Parameters: canAddEquipmentToActiveRun (bool) – Flag when true will result in parts positioned as Equipment to be added to the active Run. New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
SetClassificationObjectIdentifier¶
-
PartPlacementBuilder.
SetClassificationObjectIdentifier
¶ Sets the identifier of the classification object associated with the part to place
Signature
SetClassificationObjectIdentifier(classificationObjectId)
Parameters: classificationObjectId (str) – New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
SetClassificationObjectIdentifierOfCompatibilityPart¶
-
PartPlacementBuilder.
SetClassificationObjectIdentifierOfCompatibilityPart
¶ Sets the identifier of the classification object associated with the compatibility part to post place
Signature
SetClassificationObjectIdentifierOfCompatibilityPart(ccType, classificationObjectId, portOne, portTwo)
Parameters: - ccType (
NXOpen.Routing.ReuseLibraryPartType
) – - classificationObjectId (str) –
- portOne (
NXOpen.Routing.Port
) – One of the ports at the intersection where compatible part needs to be placed. - portTwo (
NXOpen.Routing.Port
) – Other port at the intersection where compatible part needs to be placed.
New in version NX12.0.0.
License requirements: routing_base (“Routing Basic”)
- ccType (
SetClassificationObjectIdentifierOfPartToPostPlace¶
-
PartPlacementBuilder.
SetClassificationObjectIdentifierOfPartToPostPlace
¶ Sets the identifier of the classification object associated with the part to be post placed.
Signature
SetClassificationObjectIdentifierOfPartToPostPlace(classificationObjectId)
Parameters: classificationObjectId (str) – New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
SetFileSpecificationOfPartToPlace¶
-
PartPlacementBuilder.
SetFileSpecificationOfPartToPlace
¶ Sets the file specification of the part to place
Signature
SetFileSpecificationOfPartToPlace(filename)
Parameters: filename (str) – New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
SetPortOfPlaceableObject¶
-
PartPlacementBuilder.
SetPortOfPlaceableObject
¶ Sets the port for filtration from the part being placed.
Signature
SetPortOfPlaceableObject(sourcePortObject)
Parameters: sourcePortObject ( NXOpen.TaggedObject
) –New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
SetPositionAsOption¶
-
PartPlacementBuilder.
SetPositionAsOption
¶ Sets the positioning option
NXOpen.MechanicalRouting.PartPlacementBuilderPositionAsType
on the builder.Signature
SetPositionAsOption(positioningType)
Parameters: positioningType ( NXOpen.MechanicalRouting.PartPlacementBuilderPositionAsType
) –New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
SetPrimarySolutionsFlag¶
-
PartPlacementBuilder.
SetPrimarySolutionsFlag
¶ Sets the primary solutions flag on builder.
Signature
SetPrimarySolutionsFlag(showPrimarySolutions)
Parameters: showPrimarySolutions (bool) – New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
SetReferenceObjectForPlacement¶
-
PartPlacementBuilder.
SetReferenceObjectForPlacement
¶ Sets the reference object and reference location for placement.
Signature
SetReferenceObjectForPlacement(referenceObject, referencePositionPoint)
Parameters: - referenceObject (
NXOpen.TaggedObject
) – New object to attach to. Can be NULL. - referencePositionPoint (
NXOpen.Point3d
) – The new location for the part.
New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
- referenceObject (
UpdateLayer¶
-
PartPlacementBuilder.
UpdateLayer
¶ Updates the layer for the Design Elements created during part placement operation.
Signature
UpdateLayer(layerNumber)
Parameters: layerNumber (int) – New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
UpdateReferenceSet¶
-
PartPlacementBuilder.
UpdateReferenceSet
¶ Updates the reference set for the Design Elements created during part placement operation.
Signature
UpdateReferenceSet(referenseSetName)
Parameters: referenseSetName (str) – New in version NX11.0.0.
License requirements: routing_base (“Routing Basic”)
Validate¶
-
PartPlacementBuilder.
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.