AddComponentBuilder Class¶
-
class
NXOpen.Assemblies.
AddComponentBuilder
¶ Bases:
NXOpen.Builder
,NXOpen.IAttributeSourceObjectBuilder
Represents a builder class that performs add existing component operation in current context.
Context can be Assembly or 4GD.
To create a new instance of this class, use
NXOpen.Assemblies.AssemblyManager.CreateAddComponentBuilder()
New in version NX12.0.0.
Properties¶
Property | Description |
---|---|
ComponentName | Returns or sets the component name for added components. |
DesignElementType | Returns or sets the type of a add component |
FileNewDescriptor | Returns the file new descriptor to identify an added component in 4GD |
Layer | Returns or sets the layer for added components. |
ReferenceSet | Returns or sets the reference set for added components. |
Tag | Returns the Tag for this object. |
Methods¶
Method | Description |
---|---|
AutoAssignAttributes | Auto assigns the attributes for a given array of objects and returns an array of objects that failed to auto assign. |
AutoAssignAttributesWithNamingPattern | Auto assigns the attributes for a given object and returns an array of objects that failed to auto assign. |
Commit | Commits any edits that have been applied to the builder. |
CreateAttributeTitleToNamingPatternMap | Creates a map object of attribute titles to their corresponding naming pattern |
Destroy | Deletes the builder, and cleans up any objects created by the builder. |
GetAllProductInterfaceObjects | Returns all product interface objects available, one of these can be used as component anchor |
GetCommittedObjects | For builders that create more than one object, this method returns the objects that are created by commit. |
GetComponentAnchor | Returns the component anchor used for adding component |
GetCount | Gets the number of components to be added. |
GetInitialLocationAndOrientation | Returns the location and orientation used for adding component |
GetInitialLocationType | Get the initial location type during add component. |
GetKeepConstraintsOption | Gets the keep constraints option for added components. |
GetLogicalObjects | Returns the pre-creation objects |
GetLogicalObjectsHavingUnassignedRequiredAttributes | Returns the pre-creation objects which have unassign required attributes |
GetObject | Returns the object currently being edited by this builder. |
GetOperationFailures | Returns add component operation failures |
GetPartsToAdd | Returns the parts to be used for adding components |
GetScatterOption | Gets the scatter option for added components. |
OrientToWCS | Orient added components to the WCS |
RemoveAddedComponents | Removes the components added through add component |
ResetToSnapped | Resets the component to snapped position and orientation |
ReverseZDirection | Reverse the Z direction of added components |
RotateAlongZDirection | Rotate added components along Z direction by 90 degrees |
SetComponentAnchor | Sets the component anchor to be used for adding component |
SetCount | Sets the number of components to be added. |
SetInitialLocationAndOrientation | Sets the location and orientation to be used for adding component. |
SetInitialLocationType | Set the initial location type during add component. |
SetKeepConstraintsOption | Sets the keep constraints option for added components. |
SetPartsToAdd | Sets the parts to be used for adding components |
SetScatterOption | Sets the scatter option for added components. |
SetSynchDisplayProperties | Sets the option to synchronize display properties with the component to be added |
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¶
AddComponentBuilderLocationType Enumeration | Represents initial location type that can be present during add component |
Property Detail¶
ComponentName¶
-
AddComponentBuilder.
ComponentName
¶ Returns or sets the component name for added components.
-------------------------------------
Getter Method
Signature
ComponentName
Returns: Return type: str New in version NX12.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
ComponentName
Parameters: componentName (str) – New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
DesignElementType¶
-
AddComponentBuilder.
DesignElementType
¶ Returns or sets the type of a add component
-------------------------------------
Getter Method
Signature
DesignElementType
Returns: Return type: str New in version NX12.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
DesignElementType
Parameters: deType (str) – New in version NX12.0.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
FileNewDescriptor¶
-
AddComponentBuilder.
FileNewDescriptor
¶ Returns the file new descriptor to identify an added component in 4GD
-------------------------------------
Getter Method
Signature
FileNewDescriptor
Returns: Return type: NXOpen.FileNew
New in version NX12.0.0.
License requirements: None.
Layer¶
-
AddComponentBuilder.
Layer
¶ Returns or sets the layer for added components.
-------------------------------------
Getter Method
Signature
Layer
Returns: Return type: int New in version NX12.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
Layer
Parameters: layer (int) – New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
ReferenceSet¶
-
AddComponentBuilder.
ReferenceSet
¶ Returns or sets the reference set for added components.
-------------------------------------
Getter Method
Signature
ReferenceSet
Returns: Return type: str New in version NX12.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
ReferenceSet
Parameters: referenceSet (str) – New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
Method Detail¶
AutoAssignAttributes¶
-
AddComponentBuilder.
AutoAssignAttributes
¶ Auto assigns the attributes for a given array of objects and returns an array of objects that failed to auto assign.
Signature
AutoAssignAttributes(objects)
Parameters: objects (list of NXOpen.NXObject
) –Returns: Return type: NXOpen.ErrorList
New in version NX8.5.0.
License requirements: None.
AutoAssignAttributesWithNamingPattern¶
-
AddComponentBuilder.
AutoAssignAttributesWithNamingPattern
¶ Auto assigns the attributes for a given object and returns an array of objects that failed to auto assign.
properties needs to be created using
CreateAttributeTitleToNamingPatternMap()
Signature
AutoAssignAttributesWithNamingPattern(objects, properties)
Parameters: - objects (list of
NXOpen.NXObject
) – - properties (list of
NXOpen.NXObject
) –
Returns: Return type: New in version NX12.0.0.
License requirements: None.
- objects (list of
CreateAttributeTitleToNamingPatternMap¶
-
AddComponentBuilder.
CreateAttributeTitleToNamingPatternMap
¶ Creates a map object of attribute titles to their corresponding naming pattern
Signature
CreateAttributeTitleToNamingPatternMap(attributeTitles, titlePatterns)
Parameters: - attributeTitles (list of str) –
- titlePatterns (list of str) –
Returns: Return type: New in version NX12.0.0.
License requirements: None.
GetAllProductInterfaceObjects¶
-
AddComponentBuilder.
GetAllProductInterfaceObjects
¶ Returns all product interface objects available, one of these can be used as component anchor
Signature
GetAllProductInterfaceObjects()
Returns: Return type: list of NXOpen.Assemblies.ProductInterface.InterfaceObject
New in version NX12.0.0.
License requirements: None.
GetComponentAnchor¶
-
AddComponentBuilder.
GetComponentAnchor
¶ Returns the component anchor used for adding component
Signature
GetComponentAnchor()
Returns: Return type: NXOpen.Assemblies.ProductInterface.InterfaceObject
New in version NX12.0.0.
License requirements: None.
GetCount¶
-
AddComponentBuilder.
GetCount
¶ Gets the number of components to be added.
Signature
GetCount()
Returns: Return type: int New in version NX12.0.0.
License requirements: None.
GetInitialLocationAndOrientation¶
-
AddComponentBuilder.
GetInitialLocationAndOrientation
¶ Returns the location and orientation used for adding component
Signature
GetInitialLocationAndOrientation()
Returns: a tuple Return type: A tuple consisting of (initialLocation, initialOrientation). initialLocation is a NXOpen.Point
. initialOrientation is aNXOpen.CoordinateSystem
.New in version NX12.0.0.
License requirements: None.
GetInitialLocationType¶
-
AddComponentBuilder.
GetInitialLocationType
¶ Get the initial location type during add component.
Signature
GetInitialLocationType()
Returns: Return type: NXOpen.Assemblies.AddComponentBuilderLocationType
New in version NX12.0.0.
License requirements: None.
GetKeepConstraintsOption¶
-
AddComponentBuilder.
GetKeepConstraintsOption
¶ Gets the keep constraints option for added components.
Signature
GetKeepConstraintsOption()
Returns: Return type: bool New in version NX12.0.0.
License requirements: None.
GetLogicalObjects¶
-
AddComponentBuilder.
GetLogicalObjects
¶ Returns the pre-creation objects
Signature
GetLogicalObjects()
Returns: Return type: list of NXOpen.PDM.LogicalObject
New in version NX12.0.0.
License requirements: None.
GetLogicalObjectsHavingUnassignedRequiredAttributes¶
-
AddComponentBuilder.
GetLogicalObjectsHavingUnassignedRequiredAttributes
¶ Returns the pre-creation objects which have unassign required attributes
Signature
GetLogicalObjectsHavingUnassignedRequiredAttributes()
Returns: Return type: list of NXOpen.PDM.LogicalObject
New in version NX12.0.0.
License requirements: None.
GetOperationFailures¶
-
AddComponentBuilder.
GetOperationFailures
¶ Returns add component operation failures
Signature
GetOperationFailures()
Returns: Return type: NXOpen.ErrorList
New in version NX12.0.0.
License requirements: None.
GetPartsToAdd¶
-
AddComponentBuilder.
GetPartsToAdd
¶ Returns the parts to be used for adding components
Signature
GetPartsToAdd()
Returns: Return type: list of NXOpen.BasePart
New in version NX12.0.0.
License requirements: None.
GetScatterOption¶
-
AddComponentBuilder.
GetScatterOption
¶ Gets the scatter option for added components.
Signature
GetScatterOption()
Returns: Return type: bool New in version NX12.0.0.
License requirements: None.
OrientToWCS¶
-
AddComponentBuilder.
OrientToWCS
¶ Orient added components to the WCS
Signature
OrientToWCS()
New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
RemoveAddedComponents¶
-
AddComponentBuilder.
RemoveAddedComponents
¶ Removes the components added through add component
Signature
RemoveAddedComponents()
New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
ResetToSnapped¶
-
AddComponentBuilder.
ResetToSnapped
¶ Resets the component to snapped position and orientation
Signature
ResetToSnapped()
New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
ReverseZDirection¶
-
AddComponentBuilder.
ReverseZDirection
¶ Reverse the Z direction of added components
Signature
ReverseZDirection()
New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
RotateAlongZDirection¶
-
AddComponentBuilder.
RotateAlongZDirection
¶ Rotate added components along Z direction by 90 degrees
Signature
RotateAlongZDirection()
New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
SetComponentAnchor¶
-
AddComponentBuilder.
SetComponentAnchor
¶ Sets the component anchor to be used for adding component
Signature
SetComponentAnchor(componentAnchor)
Parameters: componentAnchor ( NXOpen.Assemblies.ProductInterface.InterfaceObject
) –New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
SetCount¶
-
AddComponentBuilder.
SetCount
¶ Sets the number of components to be added.
Signature
SetCount(count)
Parameters: count (int) – New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
SetInitialLocationAndOrientation¶
-
AddComponentBuilder.
SetInitialLocationAndOrientation
¶ Overloaded method SetInitialLocationAndOrientation
SetInitialLocationAndOrientation(initialLocation, initialOrientation)
SetInitialLocationAndOrientation(point, orientation)
-------------------------------------
Sets the location and orientation to be used for adding component. Orientation is optional and user can pass None.
Signature
SetInitialLocationAndOrientation(initialLocation, initialOrientation)
Parameters: - initialLocation (
NXOpen.Point
) – - initialOrientation (
NXOpen.CoordinateSystem
) –
New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
-------------------------------------
Sets the location and orientation to be used for add component. Orientation is optional and user can pass None.
Signature
SetInitialLocationAndOrientation(point, orientation)
Parameters: - point (
NXOpen.Point3d
) – - orientation (
NXOpen.Matrix3x3
) –
New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
-------------------------------------
SetInitialLocationType¶
-
AddComponentBuilder.
SetInitialLocationType
¶ Set the initial location type during add component.
Signature
SetInitialLocationType(locationType)
Parameters: locationType ( NXOpen.Assemblies.AddComponentBuilderLocationType
) –New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
SetKeepConstraintsOption¶
-
AddComponentBuilder.
SetKeepConstraintsOption
¶ Sets the keep constraints option for added components.
Signature
SetKeepConstraintsOption(keepConstraintsOption)
Parameters: keepConstraintsOption (bool) – New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
SetPartsToAdd¶
-
AddComponentBuilder.
SetPartsToAdd
¶ Sets the parts to be used for adding components
Signature
SetPartsToAdd(partsToUse)
Parameters: partsToUse (list of NXOpen.BasePart
) –New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
SetScatterOption¶
-
AddComponentBuilder.
SetScatterOption
¶ Sets the scatter option for added components.
Signature
SetScatterOption(scatterOption)
Parameters: scatterOption (bool) – New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
SetSynchDisplayProperties¶
-
AddComponentBuilder.
SetSynchDisplayProperties
¶ Sets the option to synchronize display properties with the component to be added
Signature
SetSynchDisplayProperties(synchDisplayProperties)
Parameters: synchDisplayProperties (bool) – New in version NX12.0.0.
License requirements: assemblies (“ASSEMBLIES MODULE”)
Validate¶
-
AddComponentBuilder.
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.