PartOperationCreateBuilder Class

class NXOpen.PDM.PartOperationCreateBuilder

Bases: NXOpen.PDM.PartOperationBuilder

Represents a builder class that performs Create operations

To create a new instance of this class, use NXOpen.PDM.PdmSession.CreateCreateOperationBuilder()

New in version NX10.0.0.

Properties

Property Description
DefaultDestinationFolder Returns or sets the default destination folder string for the part being created .
DependentFileSaveAsOption Returns or sets the Dependent files Save As option.
ReplaceAllComponents Returns or sets the replace all components.
Tag Returns the Tag for this object.

Methods

Method Description
AddRelatedPartToOperate Add related part to the part undergoing an operation.
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.
ClearWarnings Executes method ClearWarningCodeToLogicalObjectsSetMap() which clears m_warningCodeToLogicalObjectsSetMap
Commit Commits any edits that have been applied to the builder.
CreateAttributeTitleToNamingPatternMap Creates a map object of attribute titles to their corresponding naming pattern
CreateLogicalObjects Creates the pre-creation objects for the parts
CreateNonMasterListForLogicalObject Create NonMaster list for the selected logical Object
CreateSpecificationsForLogicalObjects Create new specifications for Logical Objects
Destroy Deletes the builder, and cleans up any objects created by the builder.
EditNonMasterName Sets the name the non-master part will get saved as.
GetAddMaster Returns logical value to indicate whether master to be added as child component
GetAlternateIDManager Create an instance of a NXOpen.PDM.AlternateIdManager class that will be used to create alternate ID information while creating the new part.
GetCommittedObjects For builders that create more than one object, this method returns the objects that are created by commit.
GetDialogOperation Returns the dialog operation Applicable only for operation types PartOperationBuilderOperationType.SaveAs and PartOperationBuilderOperationType.Revise
GetErrorMessageHandler Returns ErrorMessageHandler
GetNonMasterCopyOption Get the nonmasters saveAs option for given logical object.
GetNonMasterList Gets NonMaster list for the given logical Object
GetObject Returns the object currently being edited by this builder.
GetOperationFailures Returns part operation failures
GetOperationSubType Returns the NXOpen.PDM.PartOperationCreateBuilderOperationSubType for Create.
IsNonMasterBeingCopied Returns whether or not the non master part specified for the given :py:class:`NXOpen.PDM.LogicalObject`will actually get saved during the save as operation.
SetAddMaster Sets the Add Master Flag Use this only in case creating a new Altrep.
SetDialogOperation Sets the dialog operation.
SetItemType Sets the selected Item Type
SetMasterPart Sets the Master Part Use this only in case the part your are trying to create supports master model.
SetModelType Sets the selected Model Type This is same as the Relation Type that is set by NXOpen.FileNew.RelationType() and is same as the relation type specified in Template PAX files.
SetNonMasterSaveAsOption Set the nonmasters saveAs option for given logical object
SetOperationSubType Sets the NXOpen.PDM.PartOperationCreateBuilderOperationSubType for Create.
SetPartSpecToOpen Sets the Part Spec of the part to open in case of Select Template Dialog This is only applicable if NXOpen.PDM.PartOperationCreateBuilderOperationSubType is set to NXOpen.PDM.PartOperationCreateBuilderOperationSubType.SelectTemplate partSpecTopOpen can be a CLI format (<@>DB/MFKID/RevId) or full TCIN file specification (starting with %UGMGR)
SetPartsToRename Sets the Parts To Rename on the Builder.
SetSelectedNonMasterToSaveAs Sets whether or not the non-master part specified will actually get saved during the save as operation.
SetSelectedParts Sets the selected parts.
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.
ValidateLogicalObjectsToCommit Validates NXOpen.PDM.LogicalObject objects with this builder and udpates the operation failuers.

Enumerations

PartOperationCreateBuilderOperationSubType Enumeration Represents an operation sub type for creating a part

Method Detail

AutoAssignAttributes

PartOperationCreateBuilder.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

PartOperationCreateBuilder.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:
Returns:

Return type:

NXOpen.ErrorList

New in version NX12.0.0.

License requirements: None.

CreateAttributeTitleToNamingPatternMap

PartOperationCreateBuilder.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:

NXOpen.NXObject

New in version NX12.0.0.

License requirements: None.

GetAddMaster

PartOperationCreateBuilder.GetAddMaster

Returns logical value to indicate whether master to be added as child component

Signature GetAddMaster()

Returns:whether master to be added as child component
Return type:bool

New in version NX10.0.0.

License requirements: None.

GetOperationSubType

PartOperationCreateBuilder.GetOperationSubType

Returns the NXOpen.PDM.PartOperationCreateBuilderOperationSubType for Create.

Signature GetOperationSubType()

Returns:
Return type:NXOpen.PDM.PartOperationCreateBuilderOperationSubType

New in version NX10.0.0.

License requirements: None.

SetAddMaster

PartOperationCreateBuilder.SetAddMaster

Sets the Add Master Flag Use this only in case creating a new Altrep.

This will add master as a component to newly created master. This will be set to false if tempalte selected doesn’t supports creating new altrep.

Signature SetAddMaster(addMaster)

Parameters:addMaster (bool) –

New in version NX10.0.0.

License requirements: None.

SetItemType

PartOperationCreateBuilder.SetItemType

Sets the selected Item Type

Signature SetItemType(itemType)

Parameters:itemType (str) –

New in version NX10.0.0.

License requirements: None.

SetMasterPart

PartOperationCreateBuilder.SetMasterPart

Sets the Master Part Use this only in case the part your are trying to create supports master model.

Signature SetMasterPart(masterPart)

Parameters:masterPart (NXOpen.BasePart) –

New in version NX10.0.0.

License requirements: None.

SetModelType

PartOperationCreateBuilder.SetModelType

Sets the selected Model Type This is same as the Relation Type that is set by NXOpen.FileNew.RelationType() and is same as the relation type specified in Template PAX files.

This is needed to be set only when the NXOpen.PDM.PartOperationCreateBuilderOperationSubType is set to NXOpen.PDM.PartOperationCreateBuilderOperationSubType.CreateSpecification. In other cases this is read from the Template. If not set this is always assumed to be “master”. Example strings are “specification”, “manifestation”, etc.

Signature SetModelType(modelType)

Parameters:modelType (str) –

New in version NX10.0.0.

License requirements: None.

SetOperationSubType

PartOperationCreateBuilder.SetOperationSubType

Sets the NXOpen.PDM.PartOperationCreateBuilderOperationSubType for Create.

Signature SetOperationSubType(operatioSubType)

Parameters:operatioSubType (NXOpen.PDM.PartOperationCreateBuilderOperationSubType) –

New in version NX10.0.0.

License requirements: None.

SetPartSpecToOpen

PartOperationCreateBuilder.SetPartSpecToOpen

Sets the Part Spec of the part to open in case of Select Template Dialog This is only applicable if NXOpen.PDM.PartOperationCreateBuilderOperationSubType is set to NXOpen.PDM.PartOperationCreateBuilderOperationSubType.SelectTemplate partSpecTopOpen can be a CLI format (<@>DB/MFKID/RevId) or full TCIN file specification (starting with %UGMGR)

Signature SetPartSpecToOpen(partSpecToOpen)

Parameters:partSpecToOpen (str) –

New in version NX10.0.0.

License requirements: None.

SetPartsToRename

PartOperationCreateBuilder.SetPartsToRename

Sets the Parts To Rename on the Builder.

This is only applicable if NXOpen.PDM.PartOperationCreateBuilderOperationSubType is set to NXOpen.PDM.PartOperationCreateBuilderOperationSubType.Rename

Signature SetPartsToRename(partsToRename)

Parameters:partsToRename (list of NXOpen.BasePart) –

New in version NX10.0.0.

License requirements: None.

Validate

PartOperationCreateBuilder.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.