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

This class is responsible for Teamcenter file management related activities. More...

Inheritance diagram for NXOpen::PDM::FileManagement:
NXOpen::TransientObject

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

Detailed Description

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.

Constructor & Destructor Documentation

virtual NXOpen::PDM::FileManagement::~FileManagement ( )
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

Member Function Documentation

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.

  1. Excluded Named Reference List:
  2. "UGPART"
  3. "UGPART-MASSPR</li> <li>"UGPART-BBOX
  4. "UGPART-ATTRIBUTES</li> <li>"UGPART-ATTR
  5. "Trushape-Data</li> <li>"BVRSYNCINFO
  6. "UG-QuickAccess-Binary</li> <li>"UG-QuickAccess-Text
  1. NX dataset types and relation names
  2. NX Model Type NX Relation Type NX Dataset Type
  3. MASTER_MODEL "has shape" "UGMASTER"
  4. SPEC_MODEL "has specification" "UGPART"
  5. MAN_MODEL "has manifestation" "UGPART"
  6. ALTREP_MODEL "has altrep" "UGALTREP"
  7. SCENARIO_MODEL "UG_scenario" "UGSCENARIO"
  8. SIMULATION_MODEL "NX_simulation" "NXSimulation"
  9. MOTION_MODEL "NX_simulation" "NXMotion"
  10. CAE_SOLN_MODEL "NX_simulation" "CAESolution"
  11. CAE_MESH_MODEL "NX_simulation" "CAEMesh"
  12. CAE_GEOM_MODEL "NX_simulation" "CAEGeom"
  13. FOREIGN_MODEL "Foreign" "*"

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.

Returns
Result codes. Success (0), failure (non-zero).
Created in NX6.0.3.

License requirements : None
Parameters
itemIdsMultifield Key.
NOTE: The full Unicode character set is not supported for this parameter.
itemRevisionIdsTeamcenter item revision ids.
NOTE: The full Unicode character set is not supported for this parameter.
datasetNamesTeamcenter dataset names.
NOTE: The full Unicode character set is not supported for this parameter.
datasetTypeNamesNX dataset type names.
NOTE: The full Unicode character set is not supported for this parameter.
datasetRelationTypeNamesNX dataset relation type names.
NOTE: The full Unicode character set is not supported for this parameter.
baseDirectoryNamesBase export directory name.
NOTE: The full Unicode character set is not supported for this parameter.
toolNamesTool names ("UGII V10-ALL").
NOTE: The full Unicode character set is not supported for this parameter.
exportDirectoryNamesResulting 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.

  1. NX dataset types and relation names
  2. NX Model Type NX Relation Type NX Dataset Type
  3. MASTER_MODEL "has shape" "UGMASTER"
  4. SPEC_MODEL "has specification" "UGPART"
  5. MAN_MODEL "has manifestation" "UGPART"
  6. ALTREP_MODEL "has altrep" "UGALTREP"
  7. SCENARIO_MODEL "UG_scenario" "UGSCENARIO"
  8. SIMULATION_MODEL "NX_simulation" "NXSimulation"
  9. MOTION_MODEL "NX_simulation" "NXMotion"
  10. CAE_SOLN_MODEL "NX_simulation" "CAESolution"
  11. CAE_MESH_MODEL "NX_simulation" "CAEMesh"
  12. CAE_GEOM_MODEL "NX_simulation" "CAEGeom"
  13. FOREIGN_MODEL "Foreign" "*"

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.

Returns
Result codes. Success (0), failure (non-zero).
Created in NX6.0.3.

License requirements : None
Parameters
itemIdsMultifield key.
NOTE: The full Unicode character set is not supported for this parameter.
itemRevisionIdsTeamcenter item revision ids.
NOTE: The full Unicode character set is not supported for this parameter.
datasetNamesTeamcenter dataset names.
NOTE: The full Unicode character set is not supported for this parameter.
datasetTypeNamesNX dataset type names.
NOTE: The full Unicode character set is not supported for this parameter.
datasetRelationTypeNamesNX dataset relation type names.
NOTE: The full Unicode character set is not supported for this parameter.
importDirectoryNamesImport directories which contain the files to import.
NOTE: The full Unicode character set is not supported for this parameter.

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