NX Open C++ Reference Guide
|
This class is responsible for Teamcenter file management related activities. More...
Public Member Functions | |
void | DownloadAssociatedFiles (const std::vector< NXOpen::BasePart * > &parts, const std::vector< NXOpen::PDM::PdmFile * > &files) |
Download the specified named reference files for NX use. More... | |
std::vector< int > | ExportFiles (std::vector< NXString > &itemIds, std::vector< NXString > &itemRevisionIds, std::vector< NXString > &datasetNames, std::vector< NXString > &datasetTypeNames, std::vector< NXString > &datasetRelationTypeNames, std::vector< NXString > &baseDirectoryNames, std::vector< NXString > &toolNames, std::vector< NXString > &exportDirectoryNames) |
Exports all associated files for the specified dataset(s) to a directory. More... | |
std::vector < NXOpen::PDM::PdmFile * > | GetAssociatedFiles (const std::vector< NXOpen::BasePart * > &parts, const std::vector< NXOpen::PDM::FileManagement::FileType > &fileTypesToExclude) |
Given an NX part, this method will return a list of named reference files in the corresponding Teamcenter dataset. More... | |
std::vector< int > | ImportFiles (std::vector< NXString > &itemIds, std::vector< NXString > &itemRevisionIds, std::vector< NXString > &datasetNames, std::vector< NXString > &datasetTypeNames, std::vector< NXString > &datasetRelationTypeNames, std::vector< NXString > &importDirectoryNames) |
Imports all associated files for the specified dataset(s) into the Teamcenter database. More... | |
std::vector< int > | ImportFilesAndCreateDatasets (std::vector< NXString > &itemIds, std::vector< NXString > &itemRevisionIds, std::vector< NXString > &datasetNames, std::vector< NXString > &datasetTypeNames, std::vector< NXString > &datasetRelationTypeNames, std::vector< NXString > &datasetToolNames, const std::vector< bool > &fileType, std::vector< NXString > &namedReferenceNames, std::vector< NXString > &importFileNames, std::vector< NXString > &importFileDirectoryNames) |
Import files for datasets while creating the datasets also. More... | |
virtual | ~FileManagement () |
Frees the object from memory. More... | |
Public Member Functions inherited from NXOpen::TransientObject | |
void * | GetHandle () |
Handle of the internal object represented by this object. More... | |
This class is responsible for Teamcenter file management related activities.
Use PDM::PdmSession::NewFileManagement to get the instance of this class.
Created in NX6.0.3.
PDM file types.
|
virtual |
Frees the object from memory.
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 NX6.0.3.
License requirements : None
void NXOpen::PDM::FileManagement::DownloadAssociatedFiles | ( | const std::vector< NXOpen::BasePart * > & | parts, |
const std::vector< NXOpen::PDM::PdmFile * > & | files | ||
) |
Download the specified named reference files for NX use.
Created in NX11.0.0.
License requirements : None
parts | parts |
files | files |
std::vector<int> NXOpen::PDM::FileManagement::ExportFiles | ( | std::vector< NXString > & | itemIds, |
std::vector< NXString > & | itemRevisionIds, | ||
std::vector< NXString > & | datasetNames, | ||
std::vector< NXString > & | datasetTypeNames, | ||
std::vector< NXString > & | datasetRelationTypeNames, | ||
std::vector< NXString > & | baseDirectoryNames, | ||
std::vector< NXString > & | toolNames, | ||
std::vector< NXString > & | exportDirectoryNames | ||
) |
Exports all associated files for the specified dataset(s) to a directory.
The dataset(s) are identified by their Teamcenter item id, Teamcenter item revision id, Teamcenter dataset name, NX dataset type, and NX dataset relation type. A base export directory name must be specified for each dataset along with the tool name that is requesting the export. The full path to the exported files is returned in an output array. The full path will be NX_default_directory or export_directory. Additionally, an array of PDI result codes is returned indicating the success (0) or failure (non-zero) of each export. The dataset types for FOREIGN_MODEL are the ones included in the Teamcenter preference "TC_NX_Foreign_Datasets". In such a case the input relation type should be "Foreign". The exporting of the associated file is governed by following conditions: The associated filetype should be exportable for combination of the Tool used and the Open action for operation. The associated file should not be in the excluded named reference list. For Foreign Datasets it will not export file types included in the Teamcenter preference "TC_NX_Foreign_Datasets". NX Clone can be used for exporting Foreign datasets. In case of NX CAM dataset type like "UGCAMCLSF", "UGCAMPTP", "UGCAMShopDoc", all the associated files will be exported irrespective of above conditions.
For the input itemIds: In case of Default Domain: it is Teamcenter item ID. In case of non-Default Domain: it is the multifield key. e.g. %MFK#%,=item_id=001, object_type=SupplierPart, supplier_code=x And the encoded part filename would be containing the MFK.
itemIds | Multifield Key. |
itemRevisionIds | Teamcenter item revision ids. |
datasetNames | Teamcenter dataset names. |
datasetTypeNames | NX dataset type names. |
datasetRelationTypeNames | NX dataset relation type names. |
baseDirectoryNames | Base export directory name. |
toolNames | Tool names ("UGII V10-ALL"). |
exportDirectoryNames | Resulting location of export directory |
std::vector<NXOpen::PDM::PdmFile *> NXOpen::PDM::FileManagement::GetAssociatedFiles | ( | const std::vector< NXOpen::BasePart * > & | parts, |
const std::vector< NXOpen::PDM::FileManagement::FileType > & | fileTypesToExclude | ||
) |
Given an NX part, this method will return a list of named reference files in the corresponding Teamcenter dataset.
parts | parts |
fileTypesToExclude | filetypestoexclude |
std::vector<int> NXOpen::PDM::FileManagement::ImportFiles | ( | std::vector< NXString > & | itemIds, |
std::vector< NXString > & | itemRevisionIds, | ||
std::vector< NXString > & | datasetNames, | ||
std::vector< NXString > & | datasetTypeNames, | ||
std::vector< NXString > & | datasetRelationTypeNames, | ||
std::vector< NXString > & | importDirectoryNames | ||
) |
Imports all associated files for the specified dataset(s) into the Teamcenter database.
The files will be attached to the dataset(s) as named references. The dataset(s) are identified by their Teamcenter multifield key, Teamcenter item revision id, Teamcenter dataset name, NX dataset type, and NX dataset relation type. An import directory containing the files must be specified for each dataset. An array of PDI result codes is returned indicating the success (0) or failure (non-zero) of each import. The dataset types for FOREIGN_MODEL are the ones included in the Teamcenter preference "TC_NX_Foreign_Datasets". In such a case the input relation type should be "Foreign". The named reference information from BMIDE setting will be used for the imported file extension.
For the input itemIds: In case of Default Domain: it is Teamcenter item ID. In case of non-Default Domain: it is the multifield key. e.g. %MFK#%,=item_id=001, object_type=SupplierPart, supplier_code=x And the encoded part filename would be containing the MFK.
itemIds | Multifield key. |
itemRevisionIds | Teamcenter item revision ids. |
datasetNames | Teamcenter dataset names. |
datasetTypeNames | NX dataset type names. |
datasetRelationTypeNames | NX dataset relation type names. |
importDirectoryNames | Import directories which contain the files to import. |
std::vector<int> NXOpen::PDM::FileManagement::ImportFilesAndCreateDatasets | ( | std::vector< NXString > & | itemIds, |
std::vector< NXString > & | itemRevisionIds, | ||
std::vector< NXString > & | datasetNames, | ||
std::vector< NXString > & | datasetTypeNames, | ||
std::vector< NXString > & | datasetRelationTypeNames, | ||
std::vector< NXString > & | datasetToolNames, | ||
const std::vector< bool > & | fileType, | ||
std::vector< NXString > & | namedReferenceNames, | ||
std::vector< NXString > & | importFileNames, | ||
std::vector< NXString > & | importFileDirectoryNames | ||
) |
Import files for datasets while creating the datasets also.
itemIds | Multifield key. |
itemRevisionIds | Teamcenter item revision ids. |
datasetNames | Teamcenter dataset names. |
datasetTypeNames | NX dataset type names. |
datasetRelationTypeNames | NX dataset relation type names. |
datasetToolNames | NX dataset tool names. This is not currently supported. For future use only. |
fileType | Types of files - true = Binary, false = Ascii. |
namedReferenceNames | NX dataset named reference names. |
importFileNames | Import file names which contain the files to import per dataset. |
importFileDirectoryNames | Import file directory names which contain the files to import. |