ReplacePhysicsBuilder Class — NXOpen Python API Reference 12.0.0 documentation

# ReplacePhysicsBuilder Class

class `NXOpen.Mechatronics.``ReplacePhysicsBuilder`

  Bases: `NXOpen.Builder`

  Represents a `NXOpen.Mechatronics.ReplacePhysicsBuilder` builder.

  This class migrates physics objects from replaced component to replacement component in MCD environment, and regeneration of every physics object is done by its own JA interface. To create a new instance of this class, use `NXOpen.Mechatronics.PhysicsManager.CreateReplacePhysicsBuilder()`

  New in version NX8.0.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.
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.
MappingNewphysicsFileid | Maps new physics file id according to the original file id
MappingNewphysicsObject | Maps new physics object according to the original file id
ScanPhysicsObject | Scans physics objects in context
SetReplacementStatus | Set the replacement status
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

## MappingNewphysicsFileid

`ReplacePhysicsBuilder.``MappingNewphysicsFileid`

  Maps new physics file id according to the original file id

  Signature `MappingNewphysicsFileid(originalPhysicsObjectPrototypeFileId, newFileId)`

  Parameters:

  - originalPhysicsObjectPrototypeFileId (str) – The original physics object file id
  - newFileId (str) – The new file id

  New in version NX8.5.0.

  Deprecated since version NX9.0.0: Use `NXOpen.Mechatronics.ReplacePhysicsBuilder.MappingNewphysicsObject()` instead.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

## MappingNewphysicsObject

`ReplacePhysicsBuilder.``MappingNewphysicsObject`

  Maps new physics object according to the original file id

  Signature `MappingNewphysicsObject(originalPhysicsObjectPrototypeFileId, newPhysicsObj)`

  Parameters:

  - originalPhysicsObjectPrototypeFileId (str) – The original physics object file id
  - newPhysicsObj (`NXOpen.NXObject`) – The new physics object to replace

  New in version NX9.0.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

## ScanPhysicsObject

`ReplacePhysicsBuilder.``ScanPhysicsObject`

  Scans physics objects in context

  Signature `ScanPhysicsObject(replacedPartOcc)`

  Parameters: | replacedPartOcc (`NXOpen.Assemblies.Component`) – The replaced part occurence

  New in version NX8.5.0.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

## SetReplacementStatus

`ReplacePhysicsBuilder.``SetReplacementStatus`

  Set the replacement status

  Signature `SetReplacementStatus(status)`

  Parameters: | status (bool) – The replacement status

  New in version NX8.5.2.

  License requirements: nx_mcd_core (“MECHATRONICS CONCEPT DESIGNER”)

## Validate

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