ReplaceComponentBuilder Class¶
-
class
NXOpen.Assemblies.
ReplaceComponentBuilder
¶ Bases:
NXOpen.Builder
Represents a
NXOpen.Assemblies.ReplaceComponentBuilder
builder.Input to this class can be PSM facet objects.
To create a new instance of this class, use
NXOpen.Assemblies.AssemblyManager.CreateReplaceComponentBuilder()
Default values.
Property Value ComponentLayer 1 ComponentLayerOptionType Maintain ComponentName ComponentNameType AsSpecified MaintainRelationships 1 ReplaceAllOccurrences 0 New in version NX6.0.0.
Properties¶
Property | Description |
---|---|
AllowTemporaryPartsToReplace | Returns or sets the flag to determine whether unsaved parts are allowed to replace. |
ComponentLayer | Returns or sets the layer for the new replacement part. |
ComponentLayerOptionType | Returns or sets the layer options |
ComponentName | Returns or sets the component name |
ComponentNameType | Returns or sets the component name options |
ComponentsToReplace | Returns the objects to be replaced. |
MaintainRelationships | Returns or sets the maintain relationships |
ReplaceAllOccurrences | Returns or sets the replace all occurrences |
ReplacementPart | Returns or sets the replacement part. |
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. |
GetComponentReferenceSetType | Get the reference set |
GetErrorList | Get the list of components that failed to replace with their corresponding error codes. |
GetObject | Returns the object currently being edited by this builder. |
RegisterReplacePartLoadStatus | Register the part load status with the replace operation. |
SetComponentReferenceSetType | Set the reference set |
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. |
Enumerations¶
ReplaceComponentBuilderComponentLayerOption Enumeration | Represents possible layer option for replacement part |
ReplaceComponentBuilderComponentNameOption Enumeration | Represents possible component name option for replace operation |
ReplaceComponentBuilderComponentReferenceSet Enumeration | Represents possible reference set for replacement part |
Property Detail¶
AllowTemporaryPartsToReplace¶
-
ReplaceComponentBuilder.
AllowTemporaryPartsToReplace
¶ Returns or sets the flag to determine whether unsaved parts are allowed to replace.
If set to true, then this may result in loss of unsaved data.
-------------------------------------
Getter Method
Signature
AllowTemporaryPartsToReplace
Returns: Return type: bool New in version NX7.5.1.
License requirements: None.
-------------------------------------
Setter Method
Signature
AllowTemporaryPartsToReplace
Parameters: allowTemporaryPartsToReplace (bool) – New in version NX7.5.1.
License requirements: assemblies (“ASSEMBLIES MODULE”)
ComponentLayer¶
-
ReplaceComponentBuilder.
ComponentLayer
¶ Returns or sets the layer for the new replacement part.
- -1 means use the original layers defined in the component.
- 0 means use the work layer.
- 1-256 means use the specified layer.
-------------------------------------
Getter Method
Signature
ComponentLayer
Returns: Return type: int New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
ComponentLayer
Parameters: componentLayer (int) – New in version NX6.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
ComponentLayerOptionType¶
-
ReplaceComponentBuilder.
ComponentLayerOptionType
¶ Returns or sets the layer options
-------------------------------------
Getter Method
Signature
ComponentLayerOptionType
Returns: Return type: NXOpen.Assemblies.ReplaceComponentBuilderComponentLayerOption
New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
ComponentLayerOptionType
Parameters: componentLayerOption ( NXOpen.Assemblies.ReplaceComponentBuilderComponentLayerOption
) –New in version NX6.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
ComponentName¶
-
ReplaceComponentBuilder.
ComponentName
¶ Returns or sets the component name
-------------------------------------
Getter Method
Signature
ComponentName
Returns: Return type: str New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
ComponentName
Parameters: componentName (str) – New in version NX6.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
ComponentNameType¶
-
ReplaceComponentBuilder.
ComponentNameType
¶ Returns or sets the component name options
-------------------------------------
Getter Method
Signature
ComponentNameType
Returns: Return type: NXOpen.Assemblies.ReplaceComponentBuilderComponentNameOption
New in version NX7.5.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
ComponentNameType
Parameters: componentNameOption ( NXOpen.Assemblies.ReplaceComponentBuilderComponentNameOption
) –New in version NX7.5.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
ComponentsToReplace¶
-
ReplaceComponentBuilder.
ComponentsToReplace
¶ Returns the objects to be replaced.
-------------------------------------
Getter Method
Signature
ComponentsToReplace
Returns: Return type: NXOpen.SelectDisplayableObjectList
New in version NX6.0.0.
License requirements: None.
MaintainRelationships¶
-
ReplaceComponentBuilder.
MaintainRelationships
¶ Returns or sets the maintain relationships
-------------------------------------
Getter Method
Signature
MaintainRelationships
Returns: Return type: bool New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
MaintainRelationships
Parameters: maintainRelationships (bool) – New in version NX6.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
ReplaceAllOccurrences¶
-
ReplaceComponentBuilder.
ReplaceAllOccurrences
¶ Returns or sets the replace all occurrences
-------------------------------------
Getter Method
Signature
ReplaceAllOccurrences
Returns: Return type: bool New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
ReplaceAllOccurrences
Parameters: replaceAllOccurrences (bool) – New in version NX6.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
ReplacementPart¶
-
ReplaceComponentBuilder.
ReplacementPart
¶ Returns or sets the replacement part.
-------------------------------------
Getter Method
Signature
ReplacementPart
Returns: Return type: str New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
ReplacementPart
Parameters: replacementPart (str) – New in version NX6.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
Method Detail¶
GetComponentReferenceSetType¶
-
ReplaceComponentBuilder.
GetComponentReferenceSetType
¶ Get the reference set
Signature
GetComponentReferenceSetType()
Returns: a tuple Return type: A tuple consisting of (componentReferenceSet, referenceSetName). componentReferenceSet is a NXOpen.Assemblies.ReplaceComponentBuilderComponentReferenceSet
. referenceSetName is a str. Name of the reference setNew in version NX6.0.0.
License requirements: None.
GetErrorList¶
-
ReplaceComponentBuilder.
GetErrorList
¶ Get the list of components that failed to replace with their corresponding error codes.
Caller need to dispose the error list after processing it.
Signature
GetErrorList()
Returns: Return type: NXOpen.ErrorList
New in version NX8.0.2.
License requirements: None.
RegisterReplacePartLoadStatus¶
-
ReplaceComponentBuilder.
RegisterReplacePartLoadStatus
¶ Register the part load status with the replace operation.
If during the operation a part could not be loaded, then this object will be used to store error information.
Signature
RegisterReplacePartLoadStatus()
Returns: Return type: NXOpen.PartLoadStatus
New in version NX6.0.1.
License requirements: assemblies (“ASSEMBLIES MODULE”)
SetComponentReferenceSetType¶
-
ReplaceComponentBuilder.
SetComponentReferenceSetType
¶ Set the reference set
Signature
SetComponentReferenceSetType(componentReferenceSet, referenceSetName)
Parameters: - componentReferenceSet (
NXOpen.Assemblies.ReplaceComponentBuilderComponentReferenceSet
) – Reference set - referenceSetName (str) – Name of the reference set. Used only when componentReferenceSet is
NXOpen.Assemblies.ReplaceComponentBuilderComponentReferenceSet.Others
New in version NX6.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
- componentReferenceSet (
Validate¶
-
ReplaceComponentBuilder.
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.