HPS.Exchange.File
- class HPS.Exchange.File : public IDisposable
The File class provides functions to import and export CAD files via Exchange.
Public Types
- enum Format
Enumerates the formats Exchange can recognize.
Values:
- ACIS
ACIS file (A3DEModellerType::kA3DModellerAcis).
- CADDS
CADDS file (A3DEModellerType::kA3DModellerCadds). This format requires the “From The Vault” libraries to import.
- CATIAV4
CATIA V4 file (A3DEModellerType::kA3DModellerCatia).
- CATIAV5
CATIA V5 file (A3DEModellerType::kA3DModellerCatiaV5).
- CGR
CATIA Graphical Represenation file (A3DEModellerType::kA3DModellerCgr).
- COLLADA
COLLADA (DAE) file (A3DEModellerType::kA3DModellerDAE).
- CreoProE
Creo (Pro/E) file (A3DEModellerType::kA3DModellerProE).
- DXF
Dxf file (A3DEModellerType::kA3DModellerDxf).
- IDEAS
I-DEAS file (A3DEModellerType::kA3DModellerIdeas).
- IFC
Industry Foundation Classes (IFC) file (A3DEModellerType::kA3DModellerIFC).
- IGES
IGES file (A3DEModellerType::kA3DModellerIges).
- Inventor
Autodesk Inventor file (A3DEModellerType::kA3DModellerInventor).
- KeyholeMarkupLanguage
Keyhole Markup Language (KMZ) file (A3DEModellerType::kA3DModellerKMZ). This format requires the “From The Vault” libraries.
- LatticeXVL
Lattice XVL file (A3DEModellerType::kA3DModellerXvl). This format requires the “From The Vault” libraries to import.
- OneSpaceDesigner
OneSpace Designer file (A3DEModellerType::kA3DModellerOneSpaceDesigner). This format requires the “From The Vault” libraries to import.
- PDF
PDF file (A3DEModellerType::kA3DModellerPDF). PRC or U3D data stored inside the PDF can be imported.
- Rhino
Rhinocerous 3D file (A3DEModellerType::kA3DModellerRhino).
- NXUnigraphics
NX (Unigraphics) file (A3DEModellerType::kA3DModellerUnigraphics).
- SolidWorks
SolidWorks file (A3DEModellerType::kA3DModellerSlw).
- ThreeDStudioMax
Autodesk 3D Studio Max file (A3DEModellerType::kA3DModeller3DS).
- ThreeDXML
3DXML file (A3DEModellerType::kA3DModeller3dxml).
- VDAFS
VDA-FS file (A3DEModellerType::kA3DModellerVda).
- VRML
VRML file (A3DEModellerType::kA3DModellerWrl).
- Revit
Revit file (A3DEModellerType::kA3DModellerRevit). This format is only available on 64bit compilers.
- GLTF
GLTF file (A3DEModellerType::kA3DModellerGLTF).
- DWF
Autodesk DWF file (A3DEModellerType::kA3DModellerDwf).
- FBX
FBX file (A3DEModellerType::kA3DModellerFbx).
- ThreeMF
3MF file (A3DEModellerType::kA3DModeller3mf)
Navisworks file (A3DEModellerType::kA3DModellerNavisworks)
Public Static Functions
- HPS.Exchange.ExportNotifier Export3MF (HPS.Exchange.CADModel in_cad_model, string in_file_name, HPS.Exchange.Export3MFOptionsKit in_options)
Performs an asynchronous 3MF export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
- Param in_cad_model
The CADModel containing the data to export. This CADModel must have come from a CAD file imported via Exchange, if it did not, the export will not succeed.
- Param in_file_name
The name of the file to write the 3MF data to.
- Param in_options
The options controlling the export of the 3MF data.
- HPS.Exchange.ExportNotifier Export3MF (HPS.KeyPath in_source, string in_file_name, HPS.Exchange.Export3MFOptionsKit in_options)
Performs an asynchronous 3MF export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
- Param in_source
A key path containing the data to export. The geometry and segments under this key path will be used to create the A3DAsmModelFile to export as 3MF.
- Param in_file_name
The name of the file to write the 3MF data to.
- Param in_options
The options controlling the export of the 3MF data.
- Return
An ExportNotfier object that can be used to query the export progress and status.
- HPS.Exchange.ExportNotifier Export3MF (HPS.KeyPath[] in_source, string in_file_name, HPS.Exchange.Export3MFOptionsKit in_options)
Performs an asynchronous 3MF export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
- Param in_source
An array of key paths containing the data to export. The geometry and segments under these key paths will be used to create the A3DAsmModelFile to export as 3MF.
- Param in_file_name
The name of the file to write the 3MF data to.
- Param in_options
The options controlling the export of the 3MF data.
- Return
An ExportNotfier object that can be used to query the export progress and status.
- void ExportACIS (HPS.Exchange.CADModel in_cad_model, string in_file_name, HPS.Exchange.ExportACISOptionsKit in_options)
Performs a synchronous ACIS export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
- Param in_cad_model
The CADModel containing the data to export. This CADModel must have come from a CAD file imported via Exchange, if it did not, the export will not succeed.
- Param in_file_name
The name of the file to write the ACIS data to.
- Param in_options
The options controlling the export of the ACIS data.
- void ExportFBX (HPS.Exchange.CADModel in_cad_model, string in_file_name, HPS.Exchange.ExportFBXOptionsKit in_options)
Performs a synchronous FBX export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
- Param in_cad_model
The CADModel containing the data to export. This CADModel must have come from a CAD file imported via Exchange, if it did not, the export will not succeed.
- Param in_file_name
The name of the file to write the FBX data to.
- Param in_options
The options controlling the export of the FBX data.
- void ExportGLTF (HPS.Exchange.CADModel in_cad_model, string in_file_name, HPS.Exchange.ExportGLTFOptionsKit in_options)
Performs a synchronous GLTF export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
- Param in_cad_model
The CADModel containing the data to export. This CADModel must have come from a CAD file imported via Exchange, if it did not, the export will not succeed.
- Param in_file_name
The name of the file to write the GLTF data to.
- Param in_options
The options controlling the export of the GLTF data.
- void ExportIGES (HPS.Exchange.CADModel in_cad_model, string in_file_name, HPS.Exchange.ExportIGESOptionsKit in_options)
Performs a synchronous IGES export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
- Param in_cad_model
The CADModel containing the data to export. This CADModel must have come from a CAD file imported via Exchange, if it did not, the export will not succeed.
- Param in_file_name
The name of the file to write the IGES data to.
- Param in_options
The options controlling the export of the IGES data.
- void ExportJT (HPS.Exchange.CADModel in_cad_model, string in_file_name, HPS.Exchange.ExportJTOptionsKit in_options)
Performs a synchronous JT export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
- Param in_cad_model
The CADModel containing the data to export. This CADModel must have come from a CAD file imported via Exchange, if it did not, the export will not succeed.
- Param in_file_name
The name of the file to write the JT data to.
- Param in_options
The options controlling the export of the JT data.
- void ExportOBJ (HPS.Exchange.CADModel in_cad_model, string in_file_name, HPS.Exchange.ExportOBJOptionsKit in_options)
Performs a synchronous OBJ export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
- Param in_cad_model
The CADModel containing the data to export. This CADModel must have come from a CAD file imported via Exchange, if it did not, the export will not succeed.
- Param in_file_name
The name of the file to write the OBJ data to.
- Param in_options
The options controlling the export of the OBJ data.
- void ExportParasolid (HPS.Exchange.CADModel in_cad_model, string in_file_name, HPS.Exchange.ExportParasolidOptionsKit in_options)
Performs a synchronous Parasolid export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
- Param in_cad_model
The CADModel containing the data to export. This CADModel must have come from a CAD file imported via Exchange, if it did not, the export will not succeed.
- Param in_file_name
The name of the file to write the Parasolid data to.
- Param in_options
The options controlling the export of the Parasolid data.
- HPS.Exchange.ExportNotifier ExportPRC (HPS.Exchange.CADModel in_cad_model, string in_file_name, HPS.Exchange.ExportPRCOptionsKit in_options)
Performs an asynchronous PRC export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
- Param in_cad_model
The CADModel containing the data to export. This CADModel must have come from a CAD file imported via Exchange, if it did not, the export will not succeed.
- Param in_file_name
The name of the file to write the PRC data to.
- Param in_options
The options controlling the export of the PRC data.
- Return
An ExportNotfier object that can be used to query the export progress and status.
- HPS.Exchange.ExportNotifier ExportPRC (HPS.KeyPath in_source)
Performs an asynchronous creation of an A3DAsmModelFile from a KeyPath.
- Param in_source
A key path containing the data to export. The geometry and segments under these key paths will be used to create the A3DAsmModelFile.
- Return
An ExportNotfier object that can be used to query the export progress and status.
- HPS.Exchange.ExportNotifier ExportPRC (HPS.KeyPath in_source, string in_file_name)
Performs an asynchronous PRC export from an A3DAsmModelFile created from a KeyPath.
- Param in_source
An array of key paths containing the data to export. The geometry and segments under these key paths will be used to create the A3DAsmModelFile to export as PRC.
- Param in_file_name
The name of the file to write the PRC data to.
- Return
An ExportNotfier object that can be used to query the export progress and status.
- HPS.Exchange.ExportNotifier ExportPRC (HPS.KeyPath in_source, string in_file_name, bool in_compress_tessellation)
Performs an asynchronous PRC export from an A3DAsmModelFile created from a KeyPath.
- Param in_source
An array of key paths containing the data to export. The geometry and segments under these key paths will be used to create the A3DAsmModelFile to export as PRC.
- Param in_file_name
The name of the file to write the PRC data to.
- Param in_compress_tessellation
Whether to compress the tessellation data in the PRC data. Defaults to false.
- Return
An ExportNotfier object that can be used to query the export progress and status.
- HPS.Exchange.ExportNotifier ExportPRC (HPS.KeyPath[] in_source)
Performs an asynchronous creation of an A3DAsmModelFile from a KeyPathArray.
- Param in_source
An array of key paths containing the data to export. The geometry and segments under these key paths will be used to create the A3DAsmModelFile.
- Return
An ExportNotfier object that can be used to query the export progress and status.
- HPS.Exchange.ExportNotifier ExportPRC (HPS.KeyPath[] in_source, string in_file_name)
Performs an asynchronous PRC export from an A3DAsmModelFile created from a KeyPathArray.
- Param in_source
An array of key paths containing the data to export. The geometry and segments under these key paths will be used to create the A3DAsmModelFile to export as PRC.
- Param in_file_name
The name of the file to write the PRC data to.
- Return
An ExportNotfier object that can be used to query the export progress and status.
- HPS.Exchange.ExportNotifier ExportPRC (HPS.KeyPath[] in_source, string in_file_name, bool in_compress_tessellation)
Performs an asynchronous PRC export from an A3DAsmModelFile created from a KeyPathArray.
- Param in_source
An array of key paths containing the data to export. The geometry and segments under these key paths will be used to create the A3DAsmModelFile to export as PRC.
- Param in_file_name
The name of the file to write the PRC data to.
- Param in_compress_tessellation
Whether to compress the tessellation data in the PRC data. Defaults to false.
- Return
An ExportNotfier object that can be used to query the export progress and status.
- void ExportSTEP (HPS.Exchange.CADModel in_cad_model, string in_file_name, HPS.Exchange.ExportSTEPOptionsKit in_options)
Performs a synchronous STEP export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
- Param in_cad_model
The CADModel containing the data to export. This CADModel must have come from a CAD file imported via Exchange, if it did not, the export will not succeed.
- Param in_file_name
The name of the file to write the STEP data to.
- Param in_options
The options controlling the export of the STEP data.
- void ExportSTL (HPS.Exchange.CADModel in_cad_model, string in_file_name, HPS.Exchange.ExportSTLOptionsKit in_options)
Performs a synchronous STL export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
- Param in_cad_model
The CADModel containing the data to export. This CADModel must have come from a CAD file imported via Exchange, if it did not, the export will not succeed.
- Param in_file_name
The name of the file to write the STL data to.
- Param in_options
The options controlling the export of the STL data.
- void ExportU3D (HPS.Exchange.CADModel in_cad_model, string in_file_name, HPS.Exchange.ExportU3DOptionsKit in_options)
Performs a synchronous U3D export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
- Param in_cad_model
The CADModel containing the data to export. This CADModel must have come from a CAD file imported via Exchange, if it did not, the export will not succeed.
- Param in_file_name
The name of the file to write the U3D data to.
- Param in_options
The options controlling the export of the U3D data.
- void ExportVRML (HPS.Exchange.CADModel in_cad_model, string in_file_name)
Performs a synchronous VRML export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
- void ExportXML (HPS.Exchange.CADModel in_cad_model, string in_file_name, HPS.Exchange.ExportXMLOptionsKit in_options)
Performs a synchronous XML export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
- Param in_cad_model
The CADModel containing the data to export. This CADModel must have come from a CAD file imported via Exchange, if it did not, the export will not succeed.
- Param in_file_name
The name of the file to write the XML data to.
- Param in_options
The options controlling the export of the XML data.
- HPS.Exchange.Configuration[] GetConfigurations (string in_file_name)
Gets a list of configurations for the given file (if any). It should be called prior to Import if a file has configurations and the user wants or needs to specify the configuration to import and requires a list of the available configurations. If there are configurations, the function will return an array which has been populated with the list of configurations. If there are no configurations, the function will return an empty array. May throw an IOException if a problem is encountered when querying the configurations.
- HPS.Exchange.File.Format GetFormat (string in_file_name)
Gets the format for the given file as determined by Exchange. May throw an IOException if a problem is encountered when querying the format.
- HPS.Exchange.ImportNotifier Import (byte[] in_prc_data, HPS.Exchange.ModelFileImportOptionsKit in_options)
Performs an asynchronous import of the specified PRC data with the provided options. May throw an IOException prior to starting the asynchronous import. Note that if the import is successful, the CADModel created from this import will own its associated A3DAsmModelFile (see Exchange.CADModel.GetEntityOwnership for more details).
- HPS.Exchange.ImportNotifier Import (IntPtr in_model_file, HPS.Exchange.ModelFileImportOptionsKit in_options)
Performs an asynchronous import of the specified A3DAsmModelFile with the provided options. May throw an IOException prior to starting the asynchronous import. Note that if the import is successful, the CADModel created from this import will not own its associated A3DAsmModelFile (see Exchange.CADModel.GetEntityOwnership for more details).
- Param in_model_file
The A3DAsmModelFile to import.
- Param in_options
The options controlling the import of the CAD file. Whether these options will have any effect depends on how the A3DAsmModelFile was created.
- Return
An ImportNotfier object that can be used to query the import progress and status.
- HPS.Exchange.ImportNotifier Import (string in_file_name, HPS.Exchange.ImportOptionsKit in_options)
Performs an asynchronous import of the specified CAD file with the provided options. May throw an IOException prior to starting the asynchronous import. Note that if the import is successful, the CADModel created from this import will own its associated A3DAsmModelFile (see Exchange.CADModel.GetEntityOwnership for more details).
- Param in_file_name
The name of the CAD file to import.
- Param in_options
The options controlling the import of the CAD file.
- Return
An ImportNotfier object that can be used to query the import progress and status.
- HPS.Exchange.TranslationNotifier Translate (string in_file_name, HPS.Exchange.ImportOptionsKit in_options, HPS.Exchange.TranslationOptionsKit in_translation_options)
Asynchronously translates the specified CAD files into an array of Parasolid parts, using the options provided. A valid Parasolid session is required for this function to succeed.
- Param in_file_name
The name of the CAD file to translate.
- Param in_options
The options controlling the translation of the CAD file.
- Param in_translation_options
Options used during the translation.
- Return
An TranslationNotifier object that can be used to query the import progress and status.