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

This class provides the methods necessary to create a new part in NX Manager from an existing part. More...

Inheritance diagram for NXOpen::PDM::PartFromPartBuilder:
NXOpen::PDM::PartBuilder NXOpen::TransientObject

Public Types

enum  FileSaveAs { FileSaveAsSome, FileSaveAsAll, FileSaveAsNone }
 This enum is used to specify which non-master parts and dependent files should be saved during the save as operation. More...
 
- Public Types inherited from NXOpen::PDM::PartBuilder
enum  Operation { OperationExportPartNew, OperationAssemblyDiagram, OperationAssemblyCreateNewComponent, OperationDefault }
 Tokens identifying every possible UG/Manager part selection dialog. More...
 

Public Member Functions

void Commit ()
 Creates the new part that has been fully-specified by calling methods on this builder. More...
 
void CreateNonmasterList ()
 Initializes the list of non-master parts that can be saved during the save as operation. More...
 
NXOpen::PDM::PartFromPartBuilder::FileSaveAs DependentFileSaveAsOption ()
 Returns the dependent files to save during the save as operation. More...
 
bool EditNonmasterNameToSaveAs (const NXString &oldName, const NXString &newName)
 Sets the name the non-master part will get saved as. More...
 
bool EditNonmasterNameToSaveAs (const char *oldName, const char *newName)
 Sets the name the non-master part will get saved as. More...
 
std::vector< NXStringGetNonmasterList ()
 Gets the list of non-master parts. More...
 
bool GetNonmasterToSaveAs (const NXString &partName)
 Returns whether or not the non-master part specified will actually get saved during the save as operation. More...
 
bool GetNonmasterToSaveAs (const char *partName)
 Returns whether or not the non-master part specified will actually get saved during the save as operation. More...
 
NXOpen::PDM::PartFromPartBuilder::FileSaveAs NonmasterSaveAsOption ()
 Returns the non-master parts to save during the save as operation. More...
 
void SetDependentFileSaveAsOption (NXOpen::PDM::PartFromPartBuilder::FileSaveAs saveOption)
 Sets the dependent files to save during the save as operation. More...
 
void SetNonmasterSaveAsOption (NXOpen::PDM::PartFromPartBuilder::FileSaveAs saveOption)
 Sets the non-master parts to save during the save as operation. More...
 
void SetNonmasterToSaveAs (const NXString &partName, bool doSaveAs)
 Sets whether or not the non-master part specified will actually get saved during the save as operation. More...
 
void SetNonmasterToSaveAs (const char *partName, bool doSaveAs)
 Sets whether or not the non-master part specified will actually get saved during the save as operation. More...
 
virtual ~PartFromPartBuilder ()
 Free resources associated with the instance. More...
 
- Public Member Functions inherited from NXOpen::PDM::PartBuilder
NXString AssignPartFileName (const NXString &partFileType)
 This method generates a part file name given an input part file type and assigns this part file name to the builder. More...
 
NXString AssignPartFileName (const char *partFileType)
 This method generates a part file name given an input part file type and assigns this part file name to the builder. More...
 
NXOpen::PDM::PartBuilder::PartFileNameData AssignPartFileName (const NXString &partNumber, const NXString &partRevision, const NXString &partFileNameType, const NXString &oldPartFileName)
 This method generates a part file name and assigns this part file name to the builder. More...
 
NXOpen::PDM::PartBuilder::PartFileNameData AssignPartFileName (const char *partNumber, const char *partRevision, const char *partFileNameType, const char *oldPartFileName)
 This method generates a part file name and assigns this part file name to the builder. More...
 
NXString AssignPartNumber (const NXString &partType)
 This method generates a part number given an input part type and assigns this part number to the builder. More...
 
NXString AssignPartNumber (const char *partType)
 This method generates a part number given an input part type and assigns this part number to the builder. More...
 
NXOpen::PDM::PartBuilder::PartNumberData AssignPartNumber (const NXString &oldPartNumber, const NXString &partType)
 This method generates a part number given an input part type and sets this part number to the builder. More...
 
NXOpen::PDM::PartBuilder::PartNumberData AssignPartNumber (const char *oldPartNumber, const char *partType)
 This method generates a part number given an input part type and sets this part number to the builder. More...
 
NXString AssignPartRevision ()
 This method generates a part revision and assigns this part revision to the builder. More...
 
NXOpen::PDM::PartBuilder::PartRevisionData AssignPartRevision (int overload)
 This method generates a part revision and sets this part revision to the builder. More...
 
NXOpen::PDM::PartCreationObjectCreatePartCreationObject ()
 Create an instance of a NXOpen::PDM::PartCreationObject class that acts as a proxy for a part in NX Manager mode prior to that part being created. More...
 
void CreatePartSpec (const NXString &partType, const NXString &partNumber, const NXString &partRevision, const NXString &partFileType, const NXString &partFileName)
 Create the specification for the new part that will be created. More...
 
void CreatePartSpec (const char *partType, const char *partNumber, const char *partRevision, const char *partFileType, const char *partFileName)
 Create the specification for the new part that will be created. More...
 
NXOpen::PDM::AlternateIdManagerNewAlternateIdManager ()
 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::DatabaseAttributeManagerNewDatabaseAttributeManager ()
 Create an instance of a NXOpen::PDM::DatabaseAttributeManager class that will be used to modify database attributes while creating the new part. More...
 
void SetAssignPartNumber (const NXString &partNumber)
 Sets the part number explicitly into builder. More...
 
void SetAssignPartNumber (const char *partNumber)
 Sets the part number explicitly into builder. More...
 
void SetAssignPartType (const NXString &partType)
 Sets the part type explicitly into builder. More...
 
void SetAssignPartType (const char *partType)
 Sets the part type explicitly into builder. More...
 
void SetContextOperation (NXOpen::PDM::PartBuilder::Operation operation)
 Sets explicitly the place from where part selection dialog invoked into builder. More...
 
virtual ~PartBuilder ()
 Free resources associated with the instance. More...
 
- Public Member Functions inherited from NXOpen::TransientObject
void * GetHandle ()
 Handle of the internal object represented by this object. More...
 

Detailed Description

This class provides the methods necessary to create a new part in NX Manager from an existing part.


This class is deprecated in NX10 for "Save As of master parts" operation. This class should only be used in case of Save As Non Master parts and Save As New Item Type Operations. For Save As of master parts, use NXOpen::PDM::PartOperationCopyBuilder . This class will not support Save As if there are duplicate item ids in database.


The operation that this builder supports is equivalent to the file save as operation which can:

  1. Copy a non-master dataset into a previously existing item revision,
  2. Save a master dataset (and possibly non-master datasets) into a new revision of the same item,
  3. Save any master or non-master dataset as a completely new item.



The part that is saved is always the work part. If the save is successful, then the newly saved part will be the display part.


This class is a singleton meaning only one instance of it can be exist at a time.


Created in NX4.0.0.

Member Enumeration Documentation

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

Enumerator
FileSaveAsSome 

save selected during save as

FileSaveAsAll 

save all during save as

FileSaveAsNone 

save none during save as

Constructor & Destructor Documentation

virtual NXOpen::PDM::PartFromPartBuilder::~PartFromPartBuilder ( )
virtual

Free resources associated with the instance.

After this method is called, it is illegal to use the object. In .NET, this method is automatically called when the object is deleted by the garbage collector.
Created in NX4.0.0.

License requirements : None

Member Function Documentation

void NXOpen::PDM::PartFromPartBuilder::Commit ( )

Creates the new part that has been fully-specified by calling methods on this builder.


Deprecated in NX10 for "Save As of master parts" operation. This should only be used in case of Save As Non Master parts and Save As New Item Type Operations. For Save As of master parts, use Builder::Commit instead.

Created in NX4.0.0.

License requirements : None

void NXOpen::PDM::PartFromPartBuilder::CreateNonmasterList ( )

Initializes the list of non-master parts that can be saved during the save as operation.


Deprecated in NX10 for "Save As of master parts" operation. This should only be used in case of Save As New Item Type Operations. For Save As of master parts, use NXOpen::PDM::PartOperationCopyBuilder::CreateNonMasterListForCopyLogicalObject .


Created in NX4.0.0.

License requirements : None

NXOpen::PDM::PartFromPartBuilder::FileSaveAs NXOpen::PDM::PartFromPartBuilder::DependentFileSaveAsOption ( )

Returns the dependent files to save during the save as operation.


Deprecated in NX10 for "Save As of master parts" operation. This should only be used in case of Save As New Item Type Operations. For Save As of master parts, use NXOpen::PDM::PartOperationCopyBuilder::DependentFilesToCopyOption .


Created in NX4.0.0.

License requirements : None

bool NXOpen::PDM::PartFromPartBuilder::EditNonmasterNameToSaveAs ( 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.


Deprecated in NX10 for "Save As of master parts" operation. This should only be used in case of Save As New Item Type Operations. For Save As of master parts, use NXOpen::PDM::PartOperationCopyBuilder::EditNonMasterToCopyName .

Returns
Whether or not the name is a valid data set name. The name will get set on the builder no matter if it is valid or not.
Created in NX4.0.0.

License requirements : None
Parameters
oldNamethe non-master part whose save as name is being set here
newNamethe new name
bool NXOpen::PDM::PartFromPartBuilder::EditNonmasterNameToSaveAs ( 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.


Deprecated in NX10 for "Save As of master parts" operation. This should only be used in case of Save As New Item Type Operations. For Save As of master parts, use NXOpen::PDM::PartOperationCopyBuilder::EditNonMasterToCopyName .

Returns
Whether or not the name is a valid data set name. The name will get set on the builder no matter if it is valid or not.
Created in NX4.0.0.

License requirements : None
Parameters
oldNamethe non-master part whose save as name is being set here
newNamethe new name
std::vector<NXString> NXOpen::PDM::PartFromPartBuilder::GetNonmasterList ( )

Gets the list of non-master parts.


Deprecated in NX10 for "Save As of master parts" operation. This should only be used in case of Save As New Item Type Operations. For Save As of master parts, use NXOpen::PDM::PartOperationCopyBuilder::GetNonMasterListForCopyLogicalObject .

Returns
Non-master part file names
Created in NX8.5.0.

License requirements : None
bool NXOpen::PDM::PartFromPartBuilder::GetNonmasterToSaveAs ( const NXString partName)

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


Deprecated in NX10 for "Save As of master parts" operation. This should only be used in case of Save As New Item Type Operations. For Save As of master parts, use NXOpen::PDM::PartOperationCopyBuilder::IsNonMasterForLogicalObjectBeingCopied .

Returns
True means that this non-master will be saved. False means that this non-master will not be saved.
Created in NX4.0.0.

License requirements : None
Parameters
partNamethe non-master part that the caller wants to save or not save
bool NXOpen::PDM::PartFromPartBuilder::GetNonmasterToSaveAs ( const char *  partName)

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


Deprecated in NX10 for "Save As of master parts" operation. This should only be used in case of Save As New Item Type Operations. For Save As of master parts, use NXOpen::PDM::PartOperationCopyBuilder::IsNonMasterForLogicalObjectBeingCopied .

Returns
True means that this non-master will be saved. False means that this non-master will not be saved.
Created in NX4.0.0.

License requirements : None
Parameters
partNamethe non-master part that the caller wants to save or not save
NXOpen::PDM::PartFromPartBuilder::FileSaveAs NXOpen::PDM::PartFromPartBuilder::NonmasterSaveAsOption ( )

Returns the non-master parts to save during the save as operation.


Deprecated in NX10 for "Save As of master parts" operation. This should only be used in case of Save As New Item Type Operations. For Save As of master parts, use NXOpen::PDM::PartOperationCopyBuilder::GetCopyNonMasterPartsOption .


Created in NX4.0.0.

License requirements : None

void NXOpen::PDM::PartFromPartBuilder::SetDependentFileSaveAsOption ( NXOpen::PDM::PartFromPartBuilder::FileSaveAs  saveOption)

Sets the dependent files to save during the save as operation.


Deprecated in NX10 for "Save As of master parts" operation. This should only be used in case of Save As New Item Type Operations. For Save As of master parts, use NXOpen::PDM::PartOperationCopyBuilder::DependentFilesToCopyOption .


Created in NX4.0.0.

License requirements : None

Parameters
saveOptionsave option
void NXOpen::PDM::PartFromPartBuilder::SetNonmasterSaveAsOption ( NXOpen::PDM::PartFromPartBuilder::FileSaveAs  saveOption)

Sets the non-master parts to save during the save as operation.


Deprecated in NX10 for "Save As of master parts" operation. This should only be used in case of Save As New Item Type Operations. For Save As of master parts, use NXOpen::PDM::PartOperationCopyBuilder::GetCopyNonMasterPartsOption .


Created in NX4.0.0.

License requirements : None

Parameters
saveOptionsave option
void NXOpen::PDM::PartFromPartBuilder::SetNonmasterToSaveAs ( const NXString partName,
bool  doSaveAs 
)

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 in NX10 for "Save As of master parts" operation. This should only be used in case of Save As New Item Type Operations. For Save As of master parts, use NXOpen::PDM::PartOperationCopyBuilder::SetSelectedNonMasterToCopy .


Created in NX4.0.0.

License requirements : None

Parameters
partNamethe non-master part whose save option is being set here
doSaveAsTrue means that this non-master part will be saved. False means that this non-master part will not be saved.
void NXOpen::PDM::PartFromPartBuilder::SetNonmasterToSaveAs ( const char *  partName,
bool  doSaveAs 
)

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 in NX10 for "Save As of master parts" operation. This should only be used in case of Save As New Item Type Operations. For Save As of master parts, use NXOpen::PDM::PartOperationCopyBuilder::SetSelectedNonMasterToCopy .


Created in NX4.0.0.

License requirements : None

Parameters
partNamethe non-master part whose save option is being set here
doSaveAsTrue means that this non-master part will be saved. False means that this non-master part will not be saved.

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