DesignElementBuilder Class¶
-
class
NXOpen.Assemblies.
DesignElementBuilder
¶ Bases:
NXOpen.Builder
,NXOpen.IAttributeSourceObjectBuilder
Represents a builder class that performs various design element operations.
The operation can be one of
NXOpen.Assemblies.DesignElementBuilderOperationType
To create a new instance of this class, useNXOpen.CollaborativeContentManager.CreateDesignElementBuilder()
Default values.
Property Value EditAction Partitions KeepOriginalDesignElement 0 LayerOption Original PositioningOptionValue Maintain ReferenceSet EntirePart SaveAsAction NewRevision New in version NX8.5.0.
Properties¶
Property | Description |
---|---|
Count | Returns or sets the number of design elements to be created. |
DesignElementType | Returns or sets the type of a design element |
DesignElementsToOperate | Returns the design elements to operate upon |
EditAction | Returns or sets the edit action type on a design element |
Effectivity | Returns the effectivity interface of a design element |
EffectivityTable | Returns the effectivity interface of a design element |
FileNewDescriptor | Returns the file new descriptor to identify a design element |
KeepOriginalDesignElement | Returns or sets the option determines whether to keep the original design element in the subset during save as |
Layer | Returns or sets the layer value of a design element. |
LayerOption | Returns or sets the layer option of a design element |
OwningSubsetInstance | Returns or sets the owning subset instance |
PartToUse | Returns or sets the part to use of a reuse design element. |
PositioningOptionValue | Returns or sets the positioning option of a design element |
ReferenceSet | Returns or sets the reference set of a design element |
ReferenceSetName | Returns or sets the reference set name of a design element. |
SaveAsAction | Returns or sets the save as action type of a design element |
Scatter | Returns or sets the option to determine whether to scatter design elements during creation |
State | Returns or sets the state of a design element |
Tag | Returns the Tag for this object. |
Methods¶
Method | Description |
---|---|
AddToPartitions | Specify partitions to which the design elements will be added. |
AutoAssignAttributes | Auto assigns the attributes for a given array of objects and returns an array of objects that failed to auto assign. |
Commit | Commits any edits that have been applied to the builder. |
CreateLogicalObjects | Creates the pre-creation objects for the design elements |
Destroy | Deletes the builder, and cleans up any objects created by the builder. |
GetAddPartitions | Get the partitions to which the design elements will be added. |
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. |
GetOperationFailures | Returns design element operation failures @return |
GetPosition | Gets the position of design element |
GetRemovePartitions | Get the partitions from which the design elements will be removed. |
PartiallyCommit | Equivalent to builder Commit call but this one would create design elements with minimal required information. |
RemoveFromPartitions | Specify partitions from which the design elements will be removed. |
SetPosition | Sets the position of design element. |
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¶
DesignElementBuilderEditActionType Enumeration | Represents the edit action on a design element |
DesignElementBuilderLayerOptionType Enumeration | Represents the layer option of a design element |
DesignElementBuilderOperationType Enumeration | Represents an operation type that can be performed on a design element |
DesignElementBuilderPositioningOption Enumeration | Represents the positioning option of a design element. |
DesignElementBuilderReferenceSetType Enumeration | Represents the reference set of a design element |
DesignElementBuilderSaveAsActionType Enumeration | Represents the save as action on a design element |
DesignElementBuilderStateType Enumeration | Represents the state of a design element |
Property Detail¶
Count¶
-
DesignElementBuilder.
Count
¶ Returns or sets the number of design elements to be created.
Applicable only if the operation type is set to
DesignElementBuilderOperationType.Create
-------------------------------------
Getter Method
Signature
Count()
Returns: Return type: int New in version NX8.5.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
Count(count)
Parameters: count (int) – New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
DesignElementType¶
-
DesignElementBuilder.
DesignElementType
¶ Returns or sets the type of a design element
-------------------------------------
Getter Method
Signature
DesignElementType()
Returns: Return type: str New in version NX9.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
DesignElementType(deType)
Parameters: deType (str) – New in version NX9.0.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
DesignElementsToOperate¶
-
DesignElementBuilder.
DesignElementsToOperate
¶ Returns the design elements to operate upon
-------------------------------------
Getter Method
Signature
DesignElementsToOperate()
Returns: Return type: NXOpen.SelectDisplayableObjectList
New in version NX8.5.0.
License requirements: None.
EditAction¶
-
DesignElementBuilder.
EditAction
¶ Returns or sets the edit action type on a design element
-------------------------------------
Getter Method
Signature
EditAction()
Returns: Return type: NXOpen.Assemblies.DesignElementBuilderEditActionType
New in version NX8.5.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
EditAction(actionType)
Parameters: actionType ( NXOpen.Assemblies.DesignElementBuilderEditActionType
) –New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
Effectivity¶
-
DesignElementBuilder.
Effectivity
¶ Returns the effectivity interface of a design element
-------------------------------------
Getter Method
Signature
Effectivity()
Returns: Return type: NXOpen.BasicEffectivityBuilder
New in version NX8.5.0.
Deprecated since version NX9.0.0: Use
NXOpen.Assemblies.DesignElementBuilder.EffectivityTable()
instead.License requirements: None.
EffectivityTable¶
-
DesignElementBuilder.
EffectivityTable
¶ Returns the effectivity interface of a design element
-------------------------------------
Getter Method
Signature
EffectivityTable()
Returns: Return type: NXOpen.PDM.EffectivityTableBuilder
New in version NX9.0.0.
License requirements: None.
FileNewDescriptor¶
-
DesignElementBuilder.
FileNewDescriptor
¶ Returns the file new descriptor to identify a design element
-------------------------------------
Getter Method
Signature
FileNewDescriptor()
Returns: Return type: NXOpen.FileNew
New in version NX8.5.0.
License requirements: None.
KeepOriginalDesignElement¶
-
DesignElementBuilder.
KeepOriginalDesignElement
¶ Returns or sets the option determines whether to keep the original design element in the subset during save as
-------------------------------------
Getter Method
Signature
KeepOriginalDesignElement()
Returns: Return type: bool New in version NX8.5.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
KeepOriginalDesignElement(valueType)
Parameters: valueType (bool) – New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
Layer¶
-
DesignElementBuilder.
Layer
¶ Returns or sets the layer value of a design element.
Applicable only if the layer option is set to
DesignElementBuilderLayerOptionType.AsSpecified
-------------------------------------
Getter Method
Signature
Layer()
Returns: Return type: int New in version NX8.5.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
Layer(layer)
Parameters: layer (int) – New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
LayerOption¶
-
DesignElementBuilder.
LayerOption
¶ Returns or sets the layer option of a design element
-------------------------------------
Getter Method
Signature
LayerOption()
Returns: Return type: NXOpen.Assemblies.DesignElementBuilderLayerOptionType
New in version NX8.5.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
LayerOption(layerOption)
Parameters: layerOption ( NXOpen.Assemblies.DesignElementBuilderLayerOptionType
) –New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
OwningSubsetInstance¶
-
DesignElementBuilder.
OwningSubsetInstance
¶ Returns or sets the owning subset instance
-------------------------------------
Getter Method
Signature
OwningSubsetInstance()
Returns: Return type: NXOpen.Assemblies.Subset
New in version NX8.5.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
OwningSubsetInstance(subsetInstance)
Parameters: subsetInstance ( NXOpen.Assemblies.Subset
) –New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
PartToUse¶
-
DesignElementBuilder.
PartToUse
¶ Returns or sets the part to use of a reuse design element.
Applicable only if the state is set to
DesignElementBuilderStateType.Reuse
-------------------------------------
Getter Method
Signature
PartToUse()
Returns: Return type: NXOpen.BasePart
New in version NX8.5.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
PartToUse(partToUse)
Parameters: partToUse ( NXOpen.BasePart
) –New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
PositioningOptionValue¶
-
DesignElementBuilder.
PositioningOptionValue
¶ Returns or sets the positioning option of a design element
-------------------------------------
Getter Method
Signature
PositioningOptionValue()
Returns: Return type: NXOpen.Assemblies.DesignElementBuilderPositioningOption
New in version NX9.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
PositioningOptionValue(positioningOption)
Parameters: positioningOption ( NXOpen.Assemblies.DesignElementBuilderPositioningOption
) –New in version NX9.0.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
ReferenceSet¶
-
DesignElementBuilder.
ReferenceSet
¶ Returns or sets the reference set of a design element
-------------------------------------
Getter Method
Signature
ReferenceSet()
Returns: Return type: NXOpen.Assemblies.DesignElementBuilderReferenceSetType
New in version NX8.5.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
ReferenceSet(referenceSet)
Parameters: referenceSet ( NXOpen.Assemblies.DesignElementBuilderReferenceSetType
) –New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
ReferenceSetName¶
-
DesignElementBuilder.
ReferenceSetName
¶ Returns or sets the reference set name of a design element.
Applicable only if the reference set is set to
DesignElementBuilderReferenceSetType.AsSpecified
-------------------------------------
Getter Method
Signature
ReferenceSetName()
Returns: Return type: str New in version NX8.5.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
ReferenceSetName(referenceSetName)
Parameters: referenceSetName (str) – New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
SaveAsAction¶
-
DesignElementBuilder.
SaveAsAction
¶ Returns or sets the save as action type of a design element
-------------------------------------
Getter Method
Signature
SaveAsAction()
Returns: Return type: NXOpen.Assemblies.DesignElementBuilderSaveAsActionType
New in version NX8.5.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
SaveAsAction(actionType)
Parameters: actionType ( NXOpen.Assemblies.DesignElementBuilderSaveAsActionType
) –New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
Scatter¶
-
DesignElementBuilder.
Scatter
¶ Returns or sets the option to determine whether to scatter design elements during creation
-------------------------------------
Getter Method
Signature
Scatter()
Returns: Return type: bool New in version NX9.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
Scatter(scatterValue)
Parameters: scatterValue (bool) – New in version NX9.0.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
State¶
-
DesignElementBuilder.
State
¶ Returns or sets the state of a design element
-------------------------------------
Getter Method
Signature
State()
Returns: Return type: NXOpen.Assemblies.DesignElementBuilderStateType
New in version NX8.5.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
State(state)
Parameters: state ( NXOpen.Assemblies.DesignElementBuilderStateType
) –New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
Method Detail¶
AddToPartitions¶
-
DesignElementBuilder.
AddToPartitions
¶ Specify partitions to which the design elements will be added.
The design elements will remain a member of any partitions to which they already belongs. The partitions to which the design elements will be added accumulate if this method is called more than once. If both
Assemblies.DesignElementBuilder.AddToPartitions()
andAssemblies.DesignElementBuilder.RemoveFromPartitions()
are called with the same partition then the design elements will be added or removed from that partition depending upon which was the last method called.Signature
AddToPartitions(partitions)
Parameters: partitions (list of NXOpen.Assemblies.Partition
) –New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
AutoAssignAttributes¶
-
DesignElementBuilder.
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.
CreateLogicalObjects¶
-
DesignElementBuilder.
CreateLogicalObjects
¶ Creates the pre-creation objects for the design elements
Signature
CreateLogicalObjects()
Returns: Return type: list of NXOpen.PDM.LogicalObject
New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
GetAddPartitions¶
-
DesignElementBuilder.
GetAddPartitions
¶ Get the partitions to which the design elements will be added.
Signature
GetAddPartitions()
Returns: Return type: list of NXOpen.Assemblies.Partition
New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
GetOperationFailures¶
-
DesignElementBuilder.
GetOperationFailures
¶ Returns design element operation failures
Signature
GetOperationFailures()
Returns: Return type: NXOpen.ErrorList
New in version NX8.5.0.
License requirements: None.
GetPosition¶
-
DesignElementBuilder.
GetPosition
¶ Gets the position of design element
Signature
GetPosition()
Returns: a tuple Return type: A tuple consisting of (position, orientation). position is a NXOpen.Point3d
. orientation is aNXOpen.Matrix3x3
.New in version NX8.5.0.
License requirements: None.
GetRemovePartitions¶
-
DesignElementBuilder.
GetRemovePartitions
¶ Get the partitions from which the design elements will be removed.
Signature
GetRemovePartitions()
Returns: Return type: list of NXOpen.Assemblies.Partition
New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
PartiallyCommit¶
-
DesignElementBuilder.
PartiallyCommit
¶ Equivalent to builder Commit call but this one would create design elements with minimal required information.
Can be used only when this
NXOpen.Assemblies.DesignElementBuilder
has been created withNXOpen.Assemblies.DesignElementBuilderOperationType.Create
. Call to builder Commit is required after this to Commit creation.Signature
PartiallyCommit(logicalObjects)
Parameters: logicalObjects (list of NXOpen.PDM.LogicalObject
) –New in version NX11.0.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
RemoveFromPartitions¶
-
DesignElementBuilder.
RemoveFromPartitions
¶ Specify partitions from which the design elements will be removed.
The partitions from which the design elements will be removed accumulate if this method is called more than once. If both
Assemblies.DesignElementBuilder.AddToPartitions()
andAssemblies.DesignElementBuilder.RemoveFromPartitions()
are called with the same partition then the design elements will be added or removed from that partition depending upon which was the last method called.Signature
RemoveFromPartitions(partitions)
Parameters: partitions (list of NXOpen.Assemblies.Partition
) –New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
SetPosition¶
-
DesignElementBuilder.
SetPosition
¶ Sets the position of design element.
This value is used only when positioning option is
DesignElementBuilderPositioningOption.AsSpecified
Signature
SetPosition(position, orientation)
Parameters: - position (
NXOpen.Point3d
) – - orientation (
NXOpen.Matrix3x3
) –
New in version NX8.5.0.
License requirements: nx_4gd_integration (“4th Generation Design”)
- position (
Validate¶
-
DesignElementBuilder.
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.