AddReusablePart Class¶
-
class
NXOpen.Tooling.
AddReusablePart
¶ Bases:
NXOpen.Builder
Represents a
NXOpen.Tooling.AddReusablePart
To create a new instance of this class, use
NXOpen.Tooling.AddReusablePartCollection.CreateBuilder
New in version NX5.0.0.
Properties¶
Property | Description |
---|---|
PositionMode | Returns or sets the current position method |
Tag | Returns the Tag for this object. |
Methods¶
Method | Description |
---|---|
AddClonePartName | Adds clone part name |
AddComponentMode | Adds mode for a reusable component |
AddComponentProperty | Adds Component Properties |
AddHoleInstance | Adds series of reusable components in holes |
AddNewInstance | Adds a new instance |
AddPartOccurance | Adds occurance into the part data |
AffirmReusableComponent | Affirms insertion of the reusable component |
Commit | Commits any edits that have been applied to the builder. |
ConstructParametersData | Constructs the parameters data, reads data from part family or spreadsheet and updates the parameter data in the part |
CreateCloneObject | Creates the clone operation object @return the new NXOpen.Tooling.CloneObject instance |
CreateComponents | Creates an array instance of a component |
CreateReusableConstraints | Creates constraints for the reusable component |
CreateReusablePocket | Creates pocket for a reusable component |
DeleteComponents | Deletes an array instance of a component |
DeleteReusableConstraints | Deletes constraints for the reusable component |
DeleteReusablePocket | Deletes pocket for a reusable component |
Destroy | Deletes the builder, and cleans up any objects created by the builder. |
DestroyReusableBuilder | Destroys reusable builder data |
EditReusableComponent | Edits a reusable component |
GetAttachedGeometry | Gets the attached geometry, this is mainly used to get the initial parameter @return Geometry to calculate the initial parameter |
GetCloneObject | Gets the clone operation object @return A NXOpen.Tooling.CloneObject instance |
GetCommittedObjects | For builders that create more than one object, this method returns the objects that are created by commit. |
GetDesignElement | Gets an array of design elements @return The design elements |
GetInitialPosition | Gets the initial location, this is mainly used to get default add location of a reusable component @return Drop location to initial parameter |
GetObject | Returns the object currently being edited by this builder. |
GetParentPart | Gets the parent part, this is mainly used to get context work part of a reusable component @return The parent part to place the component |
GetReusablePocketBuilder | Gets the reusable pocket builder @return The reusable component pocket builder |
GetSpreadsheetData | Gets the spreadsheet data, this is mainly used to get the attributes of a reusable component @return Spreadsheet data |
InsertReusableComponent | Inserts the component into the part data |
LoadReusableComponent | Loads the reusable component |
MoveReusableComponent | Moves a reusable component to a selected position |
RecordReusableComponent | Records the existing reusable component with the same name |
RemoveDesignElement | Removes design element component |
RemoveOldInstance | Removes the instance from the part data |
RemoveReusableComponent | Removes a reusable component |
ReverseComponentDirection | Reverses the direction of the reusable component if the reusable component is placed on a face. |
ReversePreviewComponent | Reverses the direction of the reusable component if the reusable component is not placed on a face. |
SaveLibraryPath | Saves the library name and path of the reusable component |
SetAttachedGeometry | Sets the attached geometry, this is mainly used to set the initial parameter |
SetCloneObject | Sets the clone operation object |
SetComponentProperties | Sets the reusable component properties |
SetEnablePreview | Sets the toggle of the Preview widget |
SetInitialPosition | Sets the initial location, this is mainly used to set default add location of a reusable component |
SetParentPart | Sets the parent part, this is mainly used to set context work part of a reusable component |
SetReusablePocketBuilder | Sets the reusable pocket builder |
SetSearchGeometry | Sets the search geometry for a reusable component |
SetSpreadsheetData | Sets the spreadsheet data, this is mainly used to set the attributes of a reusable component |
ShowResults | Updates the model to reflect the result of an edit to the model for all builders that support showing results. |
SubtituteReusableComponent | Subtitutes a reusable part |
UpdatePartData | Updates the part data of a reusable component |
UpdateReusableComponent | Updates the part data for a reusable component, this is mainly used to update parameter for a reusable component |
UpdateReusablePocket | Updates the pocket for a reusable component |
Validate | Validate whether the inputs to the component are sufficient for commit to be called. |
Enumerations¶
AddReusablePartModeMethod Enumeration | Represents adding or editing a reusable component mode method |
AddReusablePartPositionMethod Enumeration | Represents the position method |
Property Detail¶
PositionMode¶
-
AddReusablePart.
PositionMode
¶ Returns or sets the current position method
-------------------------------------
Getter Method
Signature
PositionMode()
Returns: Return type: NXOpen.Tooling.AddReusablePartPositionMethod
New in version NX5.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
PositionMode(positionMode)
Parameters: positionMode ( NXOpen.Tooling.AddReusablePartPositionMethod
) –New in version NX5.0.0.
License requirements: None.
Method Detail¶
AddClonePartName¶
-
AddReusablePart.
AddClonePartName
¶ Adds clone part name
Signature
AddClonePartName(clonedpartname)
Parameters: clonedpartname (str) – The new clone part name NOTE: The full Unicode character set is not supported for this parameter. New in version NX9.0.0.
License requirements: None.
AddComponentMode¶
-
AddReusablePart.
AddComponentMode
¶ Adds mode for a reusable component
Signature
AddComponentMode(modeMethod)
Parameters: modeMethod ( NXOpen.Tooling.AddReusablePartModeMethod
) –New in version NX9.0.0.
License requirements: None.
AddComponentProperty¶
-
AddReusablePart.
AddComponentProperty
¶ Adds Component Properties
Signature
AddComponentProperty(compName, refsetName, layer)
Parameters: - compName (str) – The name of the reference set used to represent the new component NOTE: The full Unicode character set is not supported for this parameter.
- refsetName (str) – The layer to place the new component on NOTE: The full Unicode character set is not supported for this parameter.
- layer (int) –
New in version NX9.0.0.
License requirements: None.
AddHoleInstance¶
-
AddReusablePart.
AddHoleInstance
¶ Adds series of reusable components in holes
Signature
AddHoleInstance(inputDirection, inputPostion)
Parameters: - inputDirection (
NXOpen.Point3d
) – The input direction of component - inputPostion (
NXOpen.Point3d
) – The input position of componnent
New in version NX9.0.0.
License requirements: None.
- inputDirection (
AddNewInstance¶
-
AddReusablePart.
AddNewInstance
¶ Adds a new instance
Signature
AddNewInstance(partOcc, index)
Parameters: - partOcc (
NXOpen.Assemblies.Component
) – Add the new occurance into the part data - index (int) – The index of component instance
New in version NX9.0.0.
License requirements: None.
- partOcc (
AddPartOccurance¶
-
AddReusablePart.
AddPartOccurance
¶ Adds occurance into the part data
Signature
AddPartOccurance(partOcc)
Parameters: partOcc ( NXOpen.Assemblies.Component
) – The component occurance to add in the part dataNew in version NX9.0.0.
License requirements: None.
AffirmReusableComponent¶
-
AddReusablePart.
AffirmReusableComponent
¶ Affirms insertion of the reusable component
Signature
AffirmReusableComponent()
New in version NX9.0.0.
License requirements: None.
ConstructParametersData¶
-
AddReusablePart.
ConstructParametersData
¶ Constructs the parameters data, reads data from part family or spreadsheet and updates the parameter data in the part
Signature
ConstructParametersData()
New in version NX9.0.0.
License requirements: None.
CreateCloneObject¶
-
AddReusablePart.
CreateCloneObject
¶ Creates the clone operation object
Signature
CreateCloneObject(applicationType, assemName)
Parameters: - applicationType (
NXOpen.Tooling.ToolingApplication
) – Wizard type - assemName (str) – Project assembly name
Returns: the new
NXOpen.Tooling.CloneObject
instanceReturn type: New in version NX6.0.0.
License requirements: None.
- applicationType (
CreateComponents¶
-
AddReusablePart.
CreateComponents
¶ Creates an array instance of a component
Signature
CreateComponents(count, selobj)
Parameters: - count (int) – The count is array instance number
- selobj (
NXOpen.NXObject
) – The selected object is FACE type, the reusable component place on the face
New in version NX9.0.0.
License requirements: None.
CreateReusableConstraints¶
-
AddReusablePart.
CreateReusableConstraints
¶ Creates constraints for the reusable component
Signature
CreateReusableConstraints(index)
Parameters: index (int) – The index part is to create constraints New in version NX9.0.0.
License requirements: None.
CreateReusablePocket¶
-
AddReusablePart.
CreateReusablePocket
¶ Creates pocket for a reusable component
Signature
CreateReusablePocket(commit)
Parameters: commit (bool) – if the variable is true, the component needs pocket New in version NX9.0.0.
License requirements: None.
DeleteComponents¶
-
AddReusablePart.
DeleteComponents
¶ Deletes an array instance of a component
Signature
DeleteComponents(count)
Parameters: count (int) – The count is array instance number New in version NX9.0.0.
License requirements: None.
DeleteReusableConstraints¶
-
AddReusablePart.
DeleteReusableConstraints
¶ Deletes constraints for the reusable component
Signature
DeleteReusableConstraints()
New in version NX9.0.0.
License requirements: None.
DeleteReusablePocket¶
-
AddReusablePart.
DeleteReusablePocket
¶ Deletes pocket for a reusable component
Signature
DeleteReusablePocket()
New in version NX9.0.0.
License requirements: None.
DestroyReusableBuilder¶
-
AddReusablePart.
DestroyReusableBuilder
¶ Destroys reusable builder data
Signature
DestroyReusableBuilder()
New in version NX9.0.0.
License requirements: None.
EditReusableComponent¶
-
AddReusablePart.
EditReusableComponent
¶ Edits a reusable component
Signature
EditReusableComponent(partOcc)
Parameters: partOcc ( NXOpen.Assemblies.Component
) – The component occurance to edit in the part dataNew in version NX9.0.0.
License requirements: None.
GetAttachedGeometry¶
-
AddReusablePart.
GetAttachedGeometry
¶ Gets the attached geometry, this is mainly used to get the initial parameter
Signature
GetAttachedGeometry()
Returns: Geometry to calculate the initial parameter Return type: NXOpen.NXObject
New in version NX9.0.0.
License requirements: None.
GetCloneObject¶
-
AddReusablePart.
GetCloneObject
¶ Gets the clone operation object
Signature
GetCloneObject()
Returns: A NXOpen.Tooling.CloneObject
instanceReturn type: NXOpen.Tooling.CloneObject
New in version NX9.0.0.
License requirements: None.
GetDesignElement¶
-
AddReusablePart.
GetDesignElement
¶ Gets an array of design elements
Signature
GetDesignElement()
Returns: The design elements Return type: list of NXOpen.Assemblies.Component
New in version NX9.0.0.
License requirements: None.
GetInitialPosition¶
-
AddReusablePart.
GetInitialPosition
¶ Gets the initial location, this is mainly used to get default add location of a reusable component
Signature
GetInitialPosition()
Returns: Drop location to initial parameter Return type: NXOpen.Point3d
New in version NX9.0.0.
License requirements: None.
GetParentPart¶
-
AddReusablePart.
GetParentPart
¶ Gets the parent part, this is mainly used to get context work part of a reusable component
Signature
GetParentPart()
Returns: The parent part to place the component Return type: NXOpen.Part
New in version NX9.0.0.
License requirements: None.
GetReusablePocketBuilder¶
-
AddReusablePart.
GetReusablePocketBuilder
¶ Gets the reusable pocket builder
Signature
GetReusablePocketBuilder()
Returns: The reusable component pocket builder Return type: NXOpen.Tooling.ReusablePocketBuilder
New in version NX9.0.0.
License requirements: None.
GetSpreadsheetData¶
-
AddReusablePart.
GetSpreadsheetData
¶ Gets the spreadsheet data, this is mainly used to get the attributes of a reusable component
Signature
GetSpreadsheetData()
Returns: Spreadsheet data Return type: NXOpen.Tooling.SpreadsheetData
New in version NX9.0.0.
License requirements: None.
InsertReusableComponent¶
-
AddReusablePart.
InsertReusableComponent
¶ Inserts the component into the part data
Signature
InsertReusableComponent(instIndex, needTransform)
Parameters: - instIndex (int) – The index of the new component being added in the part data
- needTransform (bool) – Whether the component needs to be transformed in the fastener assembly
New in version NX9.0.0.
License requirements: None.
LoadReusableComponent¶
-
AddReusablePart.
LoadReusableComponent
¶ Loads the reusable component
Signature
LoadReusableComponent(krxFile)
Parameters: krxFile (str) – The KRX file New in version NX9.0.0.
License requirements: None.
MoveReusableComponent¶
-
AddReusablePart.
MoveReusableComponent
¶ Moves a reusable component to a selected position
Signature
MoveReusableComponent(translation, rotation, index)
Parameters: - translation (
NXOpen.Vector3d
) – The translation data - rotation (
NXOpen.Matrix3x3
) – The rotation data - index (int) – The reusable component index in the part data
New in version NX9.0.0.
License requirements: None.
- translation (
RecordReusableComponent¶
-
AddReusablePart.
RecordReusableComponent
¶ Records the existing reusable component with the same name
Signature
RecordReusableComponent(fileName)
Parameters: fileName (str) – The reusable component name NOTE: The full Unicode character set is not supported for this parameter. New in version NX9.0.0.
License requirements: None.
RemoveDesignElement¶
-
AddReusablePart.
RemoveDesignElement
¶ Removes design element component
Signature
RemoveDesignElement()
New in version NX9.0.0.
License requirements: None.
RemoveOldInstance¶
-
AddReusablePart.
RemoveOldInstance
¶ Removes the instance from the part data
Signature
RemoveOldInstance(index)
Parameters: index (int) – The index of component instance New in version NX9.0.0.
License requirements: None.
RemoveReusableComponent¶
-
AddReusablePart.
RemoveReusableComponent
¶ Removes a reusable component
Signature
RemoveReusableComponent(index)
Parameters: index (int) – The reusable component index in the part data New in version NX9.0.0.
License requirements: None.
ReverseComponentDirection¶
-
AddReusablePart.
ReverseComponentDirection
¶ Reverses the direction of the reusable component if the reusable component is placed on a face.
Signature
ReverseComponentDirection(inputPosition, inputDirection, length, outputPosition, outputDirection)
Parameters: - inputPosition (
NXOpen.Point3d
) – The input position of componnent - inputDirection (
NXOpen.Point3d
) – The input direction of componnent - length (float) – The input length of componnent
- outputPosition (
NXOpen.Point3d
) – The output position of componnent - outputDirection (
NXOpen.Point3d
) – The output position of componnent
Returns: The output face of the componnent on
Return type: New in version NX9.0.0.
License requirements: None.
- inputPosition (
ReversePreviewComponent¶
-
AddReusablePart.
ReversePreviewComponent
¶ Reverses the direction of the reusable component if the reusable component is not placed on a face.
Signature
ReversePreviewComponent(rememberDir)
Parameters: rememberDir ( NXOpen.Point3d
) – The original position of componentNew in version NX9.0.0.
License requirements: None.
SaveLibraryPath¶
-
AddReusablePart.
SaveLibraryPath
¶ Saves the library name and path of the reusable component
Signature
SaveLibraryPath(libName, libpath)
Parameters: - libName (str) – Library name
- libpath (str) – The path in the library
New in version NX9.0.0.
License requirements: None.
SetAttachedGeometry¶
-
AddReusablePart.
SetAttachedGeometry
¶ Sets the attached geometry, this is mainly used to set the initial parameter
Signature
SetAttachedGeometry(part)
Parameters: part ( NXOpen.NXObject
) – Geometry to calculate the initial parameterNew in version NX9.0.0.
License requirements: None.
SetCloneObject¶
-
AddReusablePart.
SetCloneObject
¶ Sets the clone operation object
Signature
SetCloneObject(cloneObject)
Parameters: cloneObject ( NXOpen.Tooling.CloneObject
) – ANXOpen.Tooling.CloneObject
instanceNew in version NX9.0.0.
License requirements: None.
SetComponentProperties¶
-
AddReusablePart.
SetComponentProperties
¶ Sets the reusable component properties
Signature
SetComponentProperties(referenceSetName, componentName, layer)
Parameters: - referenceSetName (str) – The name of the reference set used to represent the new component
- componentName (str) – The name of the new component
- layer (int) – The layer to place the new component on
New in version NX9.0.0.
License requirements: None.
SetEnablePreview¶
-
AddReusablePart.
SetEnablePreview
¶ Sets the toggle of the Preview widget
Signature
SetEnablePreview(isTrunOn)
Parameters: isTrunOn (bool) – Whehter preview toggle is turned on, which is on the add reusable component dialog New in version NX9.0.0.
License requirements: None.
SetInitialPosition¶
-
AddReusablePart.
SetInitialPosition
¶ Sets the initial location, this is mainly used to set default add location of a reusable component
Signature
SetInitialPosition(dropLocation)
Parameters: dropLocation ( NXOpen.Point3d
) – Drop location to initial parameterNew in version NX9.0.0.
License requirements: None.
SetParentPart¶
-
AddReusablePart.
SetParentPart
¶ Sets the parent part, this is mainly used to set context work part of a reusable component
Signature
SetParentPart(part)
Parameters: part ( NXOpen.Part
) – The parent part to place the componentNew in version NX9.0.0.
License requirements: None.
SetReusablePocketBuilder¶
-
AddReusablePart.
SetReusablePocketBuilder
¶ Sets the reusable pocket builder
Signature
SetReusablePocketBuilder(pocketTag)
Parameters: pocketTag ( NXOpen.Tooling.ReusablePocketBuilder
) – The reusable component pocket builderNew in version NX9.0.0.
License requirements: None.
SetSearchGeometry¶
-
AddReusablePart.
SetSearchGeometry
¶ Sets the search geometry for a reusable component
Signature
SetSearchGeometry(isTrunOn)
Parameters: isTrunOn (bool) – Whehter the search geometry toggle is turned on, which is on the add reusable component dialog New in version NX9.0.0.
License requirements: None.
SetSpreadsheetData¶
-
AddReusablePart.
SetSpreadsheetData
¶ Sets the spreadsheet data, this is mainly used to set the attributes of a reusable component
Signature
SetSpreadsheetData(spreadsheetData)
Parameters: spreadsheetData ( NXOpen.Tooling.SpreadsheetData
) – Spreadsheet dataNew in version NX9.0.0.
License requirements: None.
SubtituteReusableComponent¶
-
AddReusablePart.
SubtituteReusableComponent
¶ Subtitutes a reusable part
Signature
SubtituteReusableComponent(substituteInstance)
Parameters: substituteInstance (bool) – Whether the resuable component needs to be substituted New in version NX9.0.0.
License requirements: None.
UpdatePartData¶
-
AddReusablePart.
UpdatePartData
¶ Updates the part data of a reusable component
Signature
UpdatePartData()
New in version NX9.0.0.
License requirements: None.
UpdateReusableComponent¶
-
AddReusablePart.
UpdateReusableComponent
¶ Updates the part data for a reusable component, this is mainly used to update parameter for a reusable component
Signature
UpdateReusableComponent()
New in version NX9.0.0.
License requirements: None.
UpdateReusablePocket¶
-
AddReusablePart.
UpdateReusablePocket
¶ Updates the pocket for a reusable component
Signature
UpdateReusablePocket()
New in version NX9.0.0.
License requirements: None.
Validate¶
-
AddReusablePart.
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.