NX Open C++ Reference Guide
|
This class is responsible for Teamcenter file management related activities. More...
Public Member Functions | |
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< 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... | |
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.
|
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
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. NOTE: The full Unicode character set is not supported for this parameter. |
itemRevisionIds | Teamcenter item revision ids. NOTE: The full Unicode character set is not supported for this parameter. |
datasetNames | Teamcenter dataset names. NOTE: The full Unicode character set is not supported for this parameter. |
datasetTypeNames | NX dataset type names. NOTE: The full Unicode character set is not supported for this parameter. |
datasetRelationTypeNames | NX dataset relation type names. NOTE: The full Unicode character set is not supported for this parameter. |
baseDirectoryNames | Base export directory name. NOTE: The full Unicode character set is not supported for this parameter. |
toolNames | Tool names ("UGII V10-ALL"). NOTE: The full Unicode character set is not supported for this parameter. |
exportDirectoryNames | Resulting location of export directory |
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. NOTE: The full Unicode character set is not supported for this parameter. |
itemRevisionIds | Teamcenter item revision ids. NOTE: The full Unicode character set is not supported for this parameter. |
datasetNames | Teamcenter dataset names. NOTE: The full Unicode character set is not supported for this parameter. |
datasetTypeNames | NX dataset type names. NOTE: The full Unicode character set is not supported for this parameter. |
datasetRelationTypeNames | NX dataset relation type names. NOTE: The full Unicode character set is not supported for this parameter. |
importDirectoryNames | Import directories which contain the files to import. NOTE: The full Unicode character set is not supported for this parameter. |