NX Open C++ Reference Guide
Public Types | Public Member Functions | List of all members
NXOpen::PDM::PartOperationBuilder Class Reference

Represents a builder class that performs various design element operations. More...

Inheritance diagram for NXOpen::PDM::PartOperationBuilder:
NXOpen::Builder NXOpen::IAttributeSourceObjectBuilder NXOpen::TaggedObject NXOpen::GeometricUtilities::IComponentBuilder NXOpen::PDM::PartOperationCopyBuilder NXOpen::PDM::PartOperationCreateBuilder NXOpen::PDM::PartOperationImportBuilder NXOpen::PDM::PartOperationMakeUniqueBuilder

Public Types

enum  DependentFileSaveAs { DependentFileSaveAsAll, DependentFileSaveAsNone }
 This enum is used to specify which dependent files should be saved during the save as operation. More...
 
enum  NonMasterSaveAs { NonMasterSaveAsAll, NonMasterSaveAsNone }
 This enum is used to specify which non-master parts should be saved during the save as operation. More...
 
enum  OperationType { OperationTypeSaveAs, OperationTypeRevise, OperationTypeCreate, OperationTypeImport }
 Represents an operation type that can be performed on a part
Created in NX9.0.0. More...
 

Public Member Functions

void AddRelatedPartToOperate (NXOpen::BasePart *basePart, const std::vector< NXOpen::BasePart * > &relatedParts, std::vector< NXString > &relatedPartsReasons, NXOpen::PDM::PartOperationBuilder::OperationType operation)
 Add related part to the part undergoing an operation. More...
 
virtual NXOpen::ErrorListAutoAssignAttributes (const std::vector< NXOpen::NXObject * > &objects)
 Auto assigns the attributes for a given array of objects and returns an array of objects that failed to auto assign. More...
 
virtual NXOpen::ErrorListAutoAssignAttributesWithNamingPattern (const std::vector< NXOpen::NXObject * > &objects, const std::vector< NXOpen::NXObject * > &properties)
 Auto assigns the attributes for a given object and returns an array of objects that failed to auto assign. More...
 
void ClearWarnings ()
 Executes method ClearWarningCodeToLogicalObjectsSetMap() which clears m_warningCodeToLogicalObjectsSetMap. More...
 
virtual NXOpen::NXObjectCreateAttributeTitleToNamingPatternMap (std::vector< NXString > &attributeTitles, std::vector< NXString > &titlePatterns)
 Creates a map object of attribute titles to their corresponding naming pattern. More...
 
void CreateLogicalObjects (std::vector< NXOpen::PDM::LogicalObject * > &logicalObjects)
 Creates the pre-creation objects for the parts
Created in NX9.0.0. More...
 
void CreateNonMasterListForLogicalObject (NXOpen::PDM::LogicalObject *logicalObject)
 Create NonMaster list for the selected logical Object
More...
 
void CreateSpecificationsForLogicalObjects (const std::vector< NXOpen::PDM::LogicalObject * > &logicalObjects)
 Create new specifications for Logical Objects
Created in NX9.0.0. More...
 
NXString DefaultDestinationFolder ()
 Returns the default destination folder string for the part being created . More...
 
NXOpen::PDM::PartOperationBuilder::DependentFileSaveAs DependentFileSaveAsOption ()
 Returns the Dependent files Save As option. More...
 
bool EditNonMasterName (NXOpen::PDM::LogicalObject *logicalObject, const NXString &oldName, const NXString &newName)
 Sets the name the non-master part will get saved as. More...
 
bool EditNonMasterName (NXOpen::PDM::LogicalObject *logicalObject, const char *oldName, const char *newName)
 Sets the name the non-master part will get saved as. More...
 
NXOpen::PDM::AlternateIdManagerGetAlternateIDManager (NXOpen::PDM::LogicalObject *logicalObject)
 Create an instance of a NXOpen::PDM::AlternateIdManager class that will be used to create alternate ID information while creating the new part. More...
 
NXOpen::PDM::PartOperationBuilder::OperationType GetDialogOperation ()
 Returns the dialog operation Applicable only for operation types PartOperationBuilder::OperationTypeSaveAs and PartOperationBuilder::OperationTypeRevise. More...
 
NXOpen::PDM::ErrorMessageHandlerGetErrorMessageHandler (bool refresh)
 Returns ErrorMessageHandler. More...
 
NXOpen::PDM::PartOperationBuilder::NonMasterSaveAs GetNonMasterCopyOption (NXOpen::PDM::LogicalObject *logicalObject)
 Get the nonmasters saveAs option for given logical object. More...
 
std::vector< NXStringGetNonMasterList (NXOpen::PDM::LogicalObject *logicalObject)
 Gets NonMaster list for the given logical Object. More...
 
NXOpen::ErrorListGetOperationFailures ()
 Returns part operation failures. More...
 
bool IsNonMasterBeingCopied (NXOpen::PDM::LogicalObject *logicalObject, const NXString &partName)
 Returns whether or not the non master part specified for the given NXOpen::PDM::LogicalObject will actually get saved during the save as operation. More...
 
bool IsNonMasterBeingCopied (NXOpen::PDM::LogicalObject *logicalObject, const char *partName)
 Returns whether or not the non master part specified for the given NXOpen::PDM::LogicalObject will actually get saved during the save as operation. More...
 
bool ReplaceAllComponents ()
 Returns the replace all components. More...
 
void SetDefaultDestinationFolder (const NXString &defaultDestinationFolder)
 Sets the default destination folder string for the part being created . More...
 
void SetDefaultDestinationFolder (const char *defaultDestinationFolder)
 Sets the default destination folder string for the part being created . More...
 
void SetDependentFileSaveAsOption (NXOpen::PDM::PartOperationBuilder::DependentFileSaveAs saveOption)
 Sets the Dependent files Save As option. More...
 
void SetDialogOperation (NXOpen::PDM::PartOperationBuilder::OperationType dialogOperation)
 Sets the dialog operation. More...
 
void SetNonMasterSaveAsOption (NXOpen::PDM::LogicalObject *logicalObject, NXOpen::PDM::PartOperationBuilder::NonMasterSaveAs saveOption)
 Set the nonmasters saveAs option for given logical object
More...
 
void SetReplaceAllComponents (bool replaceAllComponents)
 Sets the replace all components. More...
 
void SetSelectedNonMasterToSaveAs (NXOpen::PDM::LogicalObject *logicalObject, const NXString &partName)
 Sets whether or not the non-master part specified will actually get saved during the save as operation. More...
 
void SetSelectedNonMasterToSaveAs (NXOpen::PDM::LogicalObject *logicalObject, const char *partName)
 Sets whether or not the non-master part specified will actually get saved during the save as operation. More...
 
void SetSelectedParts (const std::vector< NXOpen::BasePart * > &selectedParts, std::vector< NXOpen::BasePart * > &failedParts)
 Sets the selected parts. More...
 
void ValidateLogicalObjectsToCommit ()
 Validates NXOpen::PDM::LogicalObject objects with this builder and udpates the operation failuers. More...
 
- Public Member Functions inherited from NXOpen::Builder
NXOpen::NXObjectCommit ()
 Commits any edits that have been applied to the builder. More...
 
void Destroy ()
 Deletes the builder, and cleans up any objects created by the builder. More...
 
std::vector< NXOpen::NXObject * > GetCommittedObjects ()
 For builders that create more than one object, this method returns the objects that are created by commit. More...
 
NXOpen::NXObjectGetObject ()
 Returns the object currently being edited by this builder. More...
 
void ShowResults ()
 Updates the model to reflect the result of an edit to the model for all builders that support showing results. More...
 
virtual bool Validate ()
 Validate whether the inputs to the component are sufficient for commit to be called. More...
 
- Public Member Functions inherited from NXOpen::TaggedObject
tag_t Tag () const
 Returns the tag of this object. More...
 

Detailed Description

Represents a builder class that performs various design element operations.

The operation can be one of NXOpen::PDM::PartOperationBuilder::OperationType
To create a new instance of this class, use NXOpen::PDM::PdmSession::CreateOperationBuilder

Created in NX9.0.0.

Member Enumeration Documentation

This enum is used to specify which dependent files should be saved during the save as operation.


Deprecated:
Deprecated in NX10.0.0. Use NXOpen::PDM::PartOperationCopyBuilder::CopyDependentFiles instead
Enumerator
DependentFileSaveAsAll 

save all during save as

DependentFileSaveAsNone 

save none during save as

This enum is used to specify which non-master parts should be saved during the save as operation.


Deprecated:
Deprecated in NX10.0.0. Use NXOpen::PDM::PartOperationCopyBuilder::CopyNonMasterParts instead
Enumerator
NonMasterSaveAsAll 

save all during save as

NonMasterSaveAsNone 

save none during save as

Represents an operation type that can be performed on a part
Created in NX9.0.0.


Enumerator
OperationTypeSaveAs 

Save As Part.

OperationTypeRevise 

Revise Part.

OperationTypeCreate 

Create Part.

OperationTypeImport 

Import Part.

Member Function Documentation

void NXOpen::PDM::PartOperationBuilder::AddRelatedPartToOperate ( NXOpen::BasePart basePart,
const std::vector< NXOpen::BasePart * > &  relatedParts,
std::vector< NXString > &  relatedPartsReasons,
NXOpen::PDM::PartOperationBuilder::OperationType  operation 
)

Add related part to the part undergoing an operation.

Example: if user selects a part for Save As which has Linked Part Modules that should also undergo Save As, they should be added as related parts. Applicable only for operation types PartOperationBuilder::OperationTypeSaveAs and PartOperationBuilder::OperationTypeRevise

Deprecated:
Deprecated in NX10.0.0. Use NXOpen::PDM::PartOperationCopyBuilder::AddRelatedPartsToCopy instead


Created in NX9.0.0.

License requirements : None

Parameters
basePartbasepart
relatedPartsrelatedparts
relatedPartsReasonsrelatedpartsreasons
operationoperation
virtual NXOpen::ErrorList* NXOpen::PDM::PartOperationBuilder::AutoAssignAttributes ( const std::vector< NXOpen::NXObject * > &  objects)
virtual

Auto assigns the attributes for a given array of objects and returns an array of objects that failed to auto assign.

Returns

Created in NX8.5.0.

License requirements : None
Parameters
objectsobjects

Implements NXOpen::IAttributeSourceObjectBuilder.

virtual NXOpen::ErrorList* NXOpen::PDM::PartOperationBuilder::AutoAssignAttributesWithNamingPattern ( const std::vector< NXOpen::NXObject * > &  objects,
const std::vector< NXOpen::NXObject * > &  properties 
)
virtual

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

Returns

Created in NX12.0.0.

License requirements : None
Parameters
objectsobjects
propertiesproperties

Implements NXOpen::IAttributeSourceObjectBuilder.

void NXOpen::PDM::PartOperationBuilder::ClearWarnings ( )

Executes method ClearWarningCodeToLogicalObjectsSetMap() which clears m_warningCodeToLogicalObjectsSetMap.


Created in NX10.0.0.

License requirements : None

virtual NXOpen::NXObject* NXOpen::PDM::PartOperationBuilder::CreateAttributeTitleToNamingPatternMap ( std::vector< NXString > &  attributeTitles,
std::vector< NXString > &  titlePatterns 
)
virtual

Creates a map object of attribute titles to their corresponding naming pattern.

Returns

Created in NX12.0.0.

License requirements : None
Parameters
attributeTitlesattributetitles
titlePatternstitlepatterns

Implements NXOpen::IAttributeSourceObjectBuilder.

void NXOpen::PDM::PartOperationBuilder::CreateLogicalObjects ( std::vector< NXOpen::PDM::LogicalObject * > &  logicalObjects)

Creates the pre-creation objects for the parts
Created in NX9.0.0.



License requirements : None

Parameters
logicalObjectslogicalobjects
void NXOpen::PDM::PartOperationBuilder::CreateNonMasterListForLogicalObject ( NXOpen::PDM::LogicalObject logicalObject)

Create NonMaster list for the selected logical Object

Deprecated:
Deprecated in NX10.0.0.

Use NXOpen::PDM::PartOperationCopyBuilder::CreateNonMasterListForCopyLogicalObject instead


Created in NX9.0.0.

License requirements : None

Parameters
logicalObjectlogicalobject
void NXOpen::PDM::PartOperationBuilder::CreateSpecificationsForLogicalObjects ( const std::vector< NXOpen::PDM::LogicalObject * > &  logicalObjects)

Create new specifications for Logical Objects
Created in NX9.0.0.



License requirements : None

Parameters
logicalObjectslogicalobjects
NXString NXOpen::PDM::PartOperationBuilder::DefaultDestinationFolder ( )

Returns the default destination folder string for the part being created .

It will be ignored in case of revise and creation of non-masters. The default destination folder string can be <username>:<folder>:<folder>, or :<folder>:<folder> means username is optional. In case of :<folder>:<folder>, the first : indicates Home, for example, :Newstuff, is the Newstuff folder in current user's Home container.


Created in NX10.0.0.

License requirements : None

NXOpen::PDM::PartOperationBuilder::DependentFileSaveAs NXOpen::PDM::PartOperationBuilder::DependentFileSaveAsOption ( )

Returns the Dependent files Save As option.

Save As option can be one of these PartOperationBuilder::DependentFileSaveAsAll and PartOperationBuilder::DependentFileSaveAsNone

Deprecated:
Deprecated in NX10.0.0. Use NXOpen::PDM::PartOperationCopyBuilder::DependentFilesToCopyOption instead


Created in NX9.0.0.

License requirements : None

bool NXOpen::PDM::PartOperationBuilder::EditNonMasterName ( NXOpen::PDM::LogicalObject logicalObject,
const NXString oldName,
const NXString newName 
)

Sets the name the non-master part will get saved as.

It will get saved as the original non-master name if this method is not called.

Returns
flag to indicate whether the newName is valid
Deprecated:
Deprecated in NX10.0.0. Use NXOpen::PDM::PartOperationCopyBuilder::EditNonMasterToCopyName instead


Created in NX9.0.0.

License requirements : None

Parameters
logicalObjectlogicalobject
oldNamethe non-master part whose save as name is being set here
newNamethe new name
bool NXOpen::PDM::PartOperationBuilder::EditNonMasterName ( NXOpen::PDM::LogicalObject logicalObject,
const char *  oldName,
const char *  newName 
)

Sets the name the non-master part will get saved as.

It will get saved as the original non-master name if this method is not called.

Returns
flag to indicate whether the newName is valid
Deprecated:
Deprecated in NX10.0.0. Use NXOpen::PDM::PartOperationCopyBuilder::EditNonMasterToCopyName instead


Created in NX9.0.0.

License requirements : None

Parameters
logicalObjectlogicalobject
oldNamethe non-master part whose save as name is being set here
newNamethe new name
NXOpen::PDM::AlternateIdManager* NXOpen::PDM::PartOperationBuilder::GetAlternateIDManager ( NXOpen::PDM::LogicalObject logicalObject)

Create an instance of a NXOpen::PDM::AlternateIdManager class that will be used to create alternate ID information while creating the new part.

CreateSpec call should happen before calling this method.

Returns
the new NXOpen::PDM::AlternateIdManager instance
Created in NX9.0.0.

License requirements : None
Parameters
logicalObjectlogicalobject
NXOpen::PDM::PartOperationBuilder::OperationType NXOpen::PDM::PartOperationBuilder::GetDialogOperation ( )

Returns the dialog operation Applicable only for operation types PartOperationBuilder::OperationTypeSaveAs and PartOperationBuilder::OperationTypeRevise.

Returns

Created in NX9.0.0.

License requirements : None
NXOpen::PDM::ErrorMessageHandler* NXOpen::PDM::PartOperationBuilder::GetErrorMessageHandler ( bool  refresh)

Returns ErrorMessageHandler.

Returns

Created in NX12.0.0.

License requirements : None
Parameters
refreshrefresh
NXOpen::PDM::PartOperationBuilder::NonMasterSaveAs NXOpen::PDM::PartOperationBuilder::GetNonMasterCopyOption ( NXOpen::PDM::LogicalObject logicalObject)

Get the nonmasters saveAs option for given logical object.

Save As option can be one of these PartOperationBuilder::NonMasterSaveAsAll and PartOperationBuilder::NonMasterSaveAsNone

Returns

Deprecated:
Deprecated in NX10.0.0. Use NXOpen::PDM::PartOperationCopyBuilder::GetCopyNonMasterPartsOption instead


Created in NX9.0.0.

License requirements : None

Parameters
logicalObjectlogicalobject
std::vector<NXString> NXOpen::PDM::PartOperationBuilder::GetNonMasterList ( NXOpen::PDM::LogicalObject logicalObject)

Gets NonMaster list for the given logical Object.

Returns
Non-master part file names
Deprecated:
Deprecated in NX10.0.0. Use NXOpen::PDM::PartOperationCopyBuilder::GetNonMasterListForCopyLogicalObject instead


Created in NX9.0.0.

License requirements : None

Parameters
logicalObjectlogicalobject
NXOpen::ErrorList* NXOpen::PDM::PartOperationBuilder::GetOperationFailures ( )

Returns part operation failures.

Returns

Deprecated:
Deprecated in NX12.0.0. Use NXOpen::PDM::PartOperationBuilder::GetErrorMessageHandler instead


Created in NX9.0.0.

License requirements : None

bool NXOpen::PDM::PartOperationBuilder::IsNonMasterBeingCopied ( NXOpen::PDM::LogicalObject logicalObject,
const NXString partName 
)

Returns whether or not the non master part specified for the given NXOpen::PDM::LogicalObject will actually get saved during the save as operation.

Returns
True means that this non-master will be saved. False means that this non master will not be saved.
Deprecated:
Deprecated in NX10.0.0. Use NXOpen::PDM::PartOperationCopyBuilder::IsNonMasterForLogicalObjectBeingCopied instead


Created in NX9.0.0.

License requirements : None

Parameters
logicalObjectlogicalobject
partNamethe non-master part that the caller wants to save or not save
bool NXOpen::PDM::PartOperationBuilder::IsNonMasterBeingCopied ( NXOpen::PDM::LogicalObject logicalObject,
const char *  partName 
)

Returns whether or not the non master part specified for the given NXOpen::PDM::LogicalObject will actually get saved during the save as operation.

Returns
True means that this non-master will be saved. False means that this non master will not be saved.
Deprecated:
Deprecated in NX10.0.0. Use NXOpen::PDM::PartOperationCopyBuilder::IsNonMasterForLogicalObjectBeingCopied instead


Created in NX9.0.0.

License requirements : None

Parameters
logicalObjectlogicalobject
partNamethe non-master part that the caller wants to save or not save
bool NXOpen::PDM::PartOperationBuilder::ReplaceAllComponents ( )

Returns the replace all components.

This option specifies whether part will be replaced or copied. Applicable only for operation types PartOperationBuilder::OperationTypeSaveAs and PartOperationBuilder::OperationTypeRevise

Deprecated:
Deprecated in NX10.0.0. Use NXOpen::PDM::PartOperationCopyBuilder::ReplaceAllComponentsInSession instead


Created in NX9.0.0.

License requirements : None

void NXOpen::PDM::PartOperationBuilder::SetDefaultDestinationFolder ( const NXString defaultDestinationFolder)

Sets the default destination folder string for the part being created .

It will be ignored in case of revise and creation of non-masters. The default destination folder string can be <username>:<folder>:<folder>, or :<folder>:<folder> means username is optional. In case of :<folder>:<folder>, the first : indicates Home, for example, :Newstuff, is the Newstuff folder in current user's Home container.


Created in NX10.0.0.

License requirements : None

Parameters
defaultDestinationFolderdefaultdestinationfolder
void NXOpen::PDM::PartOperationBuilder::SetDefaultDestinationFolder ( const char *  defaultDestinationFolder)

Sets the default destination folder string for the part being created .

It will be ignored in case of revise and creation of non-masters. The default destination folder string can be <username>:<folder>:<folder>, or :<folder>:<folder> means username is optional. In case of :<folder>:<folder>, the first : indicates Home, for example, :Newstuff, is the Newstuff folder in current user's Home container.


Created in NX10.0.0.

License requirements : None

Parameters
defaultDestinationFolderdefaultdestinationfolder
void NXOpen::PDM::PartOperationBuilder::SetDependentFileSaveAsOption ( NXOpen::PDM::PartOperationBuilder::DependentFileSaveAs  saveOption)

Sets the Dependent files Save As option.

Save As option can be one of these PartOperationBuilder::DependentFileSaveAsAll and PartOperationBuilder::DependentFileSaveAsNone

Deprecated:
Deprecated in NX10.0.0. Use NXOpen::PDM::PartOperationCopyBuilder::SetDependentFilesToCopyOption instead


Created in NX9.0.0.

License requirements : None

Parameters
saveOptionsaveoption
void NXOpen::PDM::PartOperationBuilder::SetDialogOperation ( NXOpen::PDM::PartOperationBuilder::OperationType  dialogOperation)

Sets the dialog operation.

Applicable only for operation types PartOperationBuilder::OperationTypeSaveAs and PartOperationBuilder::OperationTypeRevise
Created in NX9.0.0.

License requirements : None

Parameters
dialogOperationdialogoperation
void NXOpen::PDM::PartOperationBuilder::SetNonMasterSaveAsOption ( NXOpen::PDM::LogicalObject logicalObject,
NXOpen::PDM::PartOperationBuilder::NonMasterSaveAs  saveOption 
)

Set the nonmasters saveAs option for given logical object

Deprecated:
Deprecated in NX10.0.0.

Use NXOpen::PDM::PartOperationCopyBuilder::SetCopyNonMasterPartsOption instead


Created in NX9.0.0.

License requirements : None

Parameters
logicalObjectlogicalobject
saveOptionsaveoption
void NXOpen::PDM::PartOperationBuilder::SetReplaceAllComponents ( bool  replaceAllComponents)

Sets the replace all components.

This option specifies whether part will be replaced or copied. Applicable only for operation types PartOperationBuilder::OperationTypeSaveAs and PartOperationBuilder::OperationTypeRevise

Deprecated:
Deprecated in NX10.0.0. Use NXOpen::PDM::PartOperationCopyBuilder::SetReplaceAllComponentsInSession instead


Created in NX9.0.0.

License requirements : None

Parameters
replaceAllComponentsreplaceallcomponents
void NXOpen::PDM::PartOperationBuilder::SetSelectedNonMasterToSaveAs ( NXOpen::PDM::LogicalObject logicalObject,
const NXString partName 
)

Sets whether or not the non-master part specified will actually get saved during the save as operation.

True means that it will be saved. False means that it will not be saved.

Deprecated:
Deprecated in NX10.0.0. Use NXOpen::PDM::PartOperationCopyBuilder::SetSelectedNonMasterToCopy instead


Created in NX9.0.0.

License requirements : None

Parameters
logicalObjectlogicalobject
partNamethe non-master part whose save option is being set here
void NXOpen::PDM::PartOperationBuilder::SetSelectedNonMasterToSaveAs ( NXOpen::PDM::LogicalObject logicalObject,
const char *  partName 
)

Sets whether or not the non-master part specified will actually get saved during the save as operation.

True means that it will be saved. False means that it will not be saved.

Deprecated:
Deprecated in NX10.0.0. Use NXOpen::PDM::PartOperationCopyBuilder::SetSelectedNonMasterToCopy instead


Created in NX9.0.0.

License requirements : None

Parameters
logicalObjectlogicalobject
partNamethe non-master part whose save option is being set here
void NXOpen::PDM::PartOperationBuilder::SetSelectedParts ( const std::vector< NXOpen::BasePart * > &  selectedParts,
std::vector< NXOpen::BasePart * > &  failedParts 
)

Sets the selected parts.

Applicable only for operation types PartOperationBuilder::OperationTypeSaveAs and PartOperationBuilder::OperationTypeRevise Also returns an array of parts failed to added, these are not removed from the input array though. NXOpen::PDM::PartOperationBuilder::GetOperationFailures can be called to get the errors occurred during this operation.


Deprecated:
Deprecated in NX10.0.0. Use NXOpen::PDM::PartOperationCopyBuilder::SetSelectedPartsToCopy instead


Created in NX9.0.0.

License requirements : None

Parameters
selectedPartsselectedparts
failedPartsfailedparts
void NXOpen::PDM::PartOperationBuilder::ValidateLogicalObjectsToCommit ( )

Validates NXOpen::PDM::LogicalObject objects with this builder and udpates the operation failuers.

NXOpen::PDM::PartOperationBuilder::GetOperationFailures can be called to get the errors occurred during this operation.
Created in NX9.0.0.

License requirements : None


The documentation for this class was generated from the following file:
Copyright 2017 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.