A3DCommonReadWrite.h

Header file for the read-write module.

Author

Tech Soft 3D

Version

23.0

Date

January 2023

Copyright (c) 2010 - 2023 by Tech Soft 3D, Inc. All rights reserved.

Content

Data Structures

A3DRWParamsGeneralData

Reading options to filter the types of information that are read when CAD files are loaded.

A3DRWParamsPmiData

Structure to specify the PMI reading parameters.

A3DRWParamsTessellationData

Structure to set the tessellation parameters.

A3DRWParamsSearchDirData

Structure to define additional directories that the load function will search in addition to the root directory.

A3DRWParamsAssemblyData

Structure to define parameters to manage CAD assemblies reading.

A3DRWParamsMultiEntriesData

Structure to define which configurations or sub-models should be loaded when the CAD file has multiple entries.

A3DRWParamsCatiaV4Data

Reading parameters specific to CATIA V4 CAD files.

A3DRWParamsCatiaV5Data

Reading parameters specific to CATIA V5 CAD files.

A3DRWParamsUnigraphicsData

Reading parameters specific to Unigraphics CAD files.

A3DRWParamsProEData

Reading parameters specific to Pro/ENGINEER CAD files.

A3DRWValidationPropertiesThresholdData

Threshold values used for checking validation properties in Step.

A3DRWParamsStepData

Reading parameters specific to STEP files.

A3DRWParamsIGESData

Reading parameters specific to IGES files.

A3DRWParamsIFCData

Reading parameters specific to IFC files.

A3DRWParamsJTData

A structure that specifies parameters used to read the model file to JT format.

A3DRWParamsParasolidData

A structure that specifies parameters used to read the model file to Parasolid format.

A3DRWParamsSolidworksData

A structure that specifies parameters used to read the model file to Solidworks format.

A3DRWParamsInventorData

A structure that specifies parameters used to read the model file to Inventor format.

A3DRWParamsRhinoData

A structure that specifies parameters used to read the model file to Rhino format.

A3DRWParamsRevitData

A structure that specifies parameters used to read the model file to Revit format.

A3DRWParamsSolidEdgeData

A structure that specifies parameters used to read the model file to Solid Edge format.

A3DRWParamsSpecificLoadData

Structure to specify reading parameters specific to some CAD formats.

A3DRWParamsIncrementalLoadData

Structure to specify reading parameters to load some specific parts of an assembly.

A3DRWParamsLoadData

A set of options for loading a new model file with A3DAsmModelFileLoadFromFile .

A3DStream3DPDFData

Binary stream for a 3D model stored in a PDF file.

A3DRWParamsExportPrcData

A structure that specifies parameters used to write the model file to PRC format.

A3DRWParamsExportU3DData

A structure that specifies parameters used to write the model file to U3D format.

A3DRWParamsExportStepData

A structure that specifies parameters used to write the model file to a STEP format.

A3DRWParamsExportJTData

A structure that specifies parameters used to write the model file to JT format.

A3DRWParamsExportIgesData

A structure that specifies parameters used to write the model file to IGES format.

A3DRWParamsExportStlData

A structure that specifies parameters used to write the model file to STL format.

A3DRWParamsExport3mfData

A structure that specifies parameters used to write the model file to 3MF format.

A3DRWParamsExportXMLData

A structure that specifies parameters used to write the model file to XML format.

A3DRWParamsExportObjData

A structure that specifies parameters used to write the model file to OBJ format.

A3DRWParamsExportFbxData

A structure that specifies parameters used to write the model file to FBX format.

A3DRWParamsExportGltfData

A structure that specifies parameters used to write the model file to GLTF/GLB format.

Functions

A3DAsmModelFileLoadFromFile()

Loads an A3DAsmModelFile from a physical file, returning a handle to the new model file.

A3DAsmModelFileLoadFromPrcStream()

Loads an A3DAsmModelFile from a PRC Buffer.

A3DRWParamsPrcReadHelperFree()

Free PRC read helper.

A3DAsmModelFileLoadFromPrcFile()

Loads an A3DAsmModelFile from a PRC physical file.

A3DGet3DPDFStreams()

Function to retrieve all 3D streams embedded in a PDF document.

A3DAsmModelFileExportToPrcFile()

Writes a model file to a physical file in a PRC format.

A3DRWParamsPrcWriteHelperFree()

Free PRC write helper.

A3DAsmModelFileExportToU3DFile()

Writes a model file to a physical file in Universal 3D format.

A3DAsmModelFileExportToStepFile()

Writes a model file to a physical file in STEP format.

A3DAsmModelFileExportToJTFile()

Writes a model file to a physical file in JT format.

A3DAsmModelFileExportToVrmlFile()

Writes a model file to a physical file in VRML format.

A3DAsmModelFileExportToIgesFile()

Writes a model file to a physical file in IGES format.

A3DAsmModelFileExportToStlFile()

Writes a model file to a physical file in STL format.

A3DAsmModelFileExportTo3mfFile()

Writes a model file to a physical file in 3MF format.

A3DAsmModelFileExportToXMLFile()

Writes a model file to a physical file in XML format.

A3DAsmModelFileExportToObjFile()

Writes a model file to a physical file in OBJ format (with MTL for the materials).

A3DAsmModelFileExportToFbxFile()

Writes a model file to a physical file in FBX format.

A3DAsmModelFileExportToGltfFile()

Writes a model file to a physical file in GLTF/GLB format.

Functions

A3DStatus A3DAsmModelFileLoadFromFile(const A3DUTF8Char *pcFileName, const A3DRWParamsLoadData *pLoadParametersData, A3DAsmModelFile **ppModelFile)

Loads an A3DAsmModelFile from a physical file, returning a handle to the new model file.

Successfully calling this function will always create a new model file, even if the call is made several times with the same input path. Once loaded, a handle to the new model file is stored in ppModelFile and you can query its content with A3DAsmModelFileGet.

A3DRWParamsLoadData parameters;
A3D_INITIALIZE_DATA(A3DRWParamsLoadData, parameters);
A3DAsmModelFile* model_file = 0;

A3DStatus result = A3DAsmModelFileLoadFromFile("/path/to/file.stl", &parameters, &model_file);

assert(result == A3D_SUCCESS);
assert(model_file != 0);

Version

3.0

Parameters
  • pcFileName[in] The system path to the input file. Must be a valid UTF-8 string.

  • pLoadParametersData[in] A set of options used to customize the behaviour of the loading.

  • ppModelFile[out] A pointer to the handle of the new model file, in case of success.

Return values
  • A3D_SUCCESS – in case of success.

  • A3D_INITIALIZE_NOT_CALLED – if pLoadParametersData is not initialized.

  • A3D_INVALID_DATA_STRUCT_NULL – if pLoadParametersData is null.

  • A3D_INVALID_DATA_STRUCT_SIZE – if pLoadParametersData is not initialized by an incompatible version of the API.

  • A3D_INVALID_ENTITY_NULL – if ppModelFile is null.

  • A3D_LOAD_CANNOT_ACCESS_CADFILE – if the input path cannot be opened by the running process for reading.

  • A3D_LOAD_CANNOT_LOAD_MODEL – if an error occured while reading the file.

  • A3D_LOAD_CANNOT_LOAD_MULTIENTRY[I don’t know about this one]

  • A3D_LOAD_EMPTY_MULTI_MODEL[I don’t know about this one]

  • A3D_LOAD_FILE_TOO_OLD – if the reader support this format but the version is older than the minimum supported.

  • A3D_LOAD_FILE_TOO_RECENT – if the reader support this format but the version is more recent than the maximum supported.

  • A3D_LOAD_INVALID_FILE_FORMAT – if the format is not supported

  • A3D_LOAD_MISSING_COMPONENTS – if the load partially completed

  • A3D_LOAD_MULTI_MODELS_CADFILE – if the file contains multiple entries (see A3DRWParamsMultiEntriesData).

  • A3D_LOAD_READER_NOT_IMPLEMENTED – if the reader for the requested format is not avaiable yet

Returns

A3D_SUCCESS or an error code in case of failure.

A3DStatus A3DAsmModelFileLoadFromPrcStream(const A3DUTF8Char *pcBufferStream, unsigned int uBufferLength, A3DRWParamsPrcReadHelper **ppPrcReadHelper, A3DAsmModelFile **ppModelFile)

Loads an A3DAsmModelFile from a PRC Buffer.

This function loads an A3DAsmModelFile from a PRC Buffer.

Version

5.2

Parameters
  • pcBufferStream[in] Buffer containing the PRC stream.

  • uBufferLength[in] Length of pcBufferStream.

  • ppPrcReadHelper[inout] Reserved for future use.

  • ppModelFile[out] References a pointer into which the location should be stored. of the model file. Set this pointer to null before calling the function.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_ENTITY_NULL

  • A3D_LOAD_CANNOT_ACCESS_CADFILE

  • A3D_LOAD_CANNOT_LOAD_MODEL

  • A3D_LOAD_CANNOT_LOAD_MULTIENTRY

  • A3D_LOAD_EMPTY_MULTI_MODEL

  • A3D_LOAD_FILE_TOO_OLD

  • A3D_LOAD_FILE_TOO_RECENT

  • A3D_LOAD_INVALID_FILE_FORMAT

  • A3D_LOAD_MISSING_COMPONENTS

  • A3D_LOAD_MULTI_MODELS_CADFILE – if the file contains multiple entries (see A3DRWParamsMultiEntriesData).

  • A3D_LOAD_READER_NOT_IMPLEMENTED

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DVoid A3DRWParamsPrcReadHelperFree(A3DRWParamsPrcReadHelper *pA3DRWParamsPrcReadHelper)

Free PRC read helper.

Remark

Because this function does not return A3DStatus the internal thread safety policy is to wait for the availability of the API.

Version

8.1

Parameters

pA3DRWParamsPrcReadHelper[inout] The helper to free.

A3DStatus A3DAsmModelFileLoadFromPrcFile(const A3DUTF8Char *pcFileName, A3DRWParamsPrcReadHelper **ppPrcReadHelper, A3DAsmModelFile **ppModelFile)

Loads an A3DAsmModelFile from a PRC physical file.

This function loads an A3DAsmModelFile from a PRC file. The file must be in PRC format.

Version

4.0

Parameters
  • pcFileName[in] References the path to the file containing the 3D CAD model.

  • ppPrcReadHelper[inout] Reserved for future use.

  • ppModelFile[out] References a pointer into which should be stored the location of the model file. Set this pointer to null before calling the function.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_ENTITY_NULL

  • A3D_LOAD_CANNOT_ACCESS_CADFILE

  • A3D_LOAD_CANNOT_LOAD_MODEL

  • A3D_LOAD_CANNOT_LOAD_MULTIENTRY

  • A3D_LOAD_EMPTY_MULTI_MODEL

  • A3D_LOAD_FILE_TOO_OLD

  • A3D_LOAD_FILE_TOO_RECENT

  • A3D_LOAD_INVALID_FILE_FORMAT

  • A3D_LOAD_MISSING_COMPONENTS

  • A3D_LOAD_MULTI_MODELS_CADFILE – if the file contains multiple entries (see A3DRWParamsMultiEntriesData).

  • A3D_LOAD_READER_NOT_IMPLEMENTED

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DGet3DPDFStreams(const A3DUTF8Char *pcFileName, A3DStream3DPDFData **ppStreamData, A3DInt32 *piNumStreams)

Function to retrieve all 3D streams embedded in a PDF document.

The stream is the raw binary data stored as a char* stream. A PRC stream can be interpreted with the function A3DAsmModelFileLoadFromPrcStream. A U3D stream needs to be written as a physical file before being read with classical A3DAsmModelFileLoadFromFile function.

If pcFileName is NULL, *ppStreamData will be freed if *piNumStreams is non-null. A3DGet3DPDFStreams(NULL, ppStreamData, piNumStreams) to release *ppStreamData.

Remark

Note that this method does not set the identifier of the A3DStream3DPDFData. It will be defaulted to kA3DPDFUnknownStreamIdentifier.

Version

6.0

Parameters
  • pcFileName[in] References the path to the PDF file

  • ppStreamData[out] Array of stream data

  • piNumStreams[out] Number of streams

Return values
  • A3D_LOAD_CANNOT_ACCESS_CADFILE

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportToPrcFile(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExportPrcData *pParamsExportData, const A3DUTF8Char *pcCADFileName, A3DRWParamsPrcWriteHelper **ppPrcWriteHelper)

Writes a model file to a physical file in a PRC format.

This function writes the A3DAsmModelFile entity to a physical file.

Version

3.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pcCADFileName[in] References the path of the file into which the function stores the model file.

  • ppPrcWriteHelper[inout] Used to get PRC data such as unique identifiers of PRC nodes.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DVoid A3DRWParamsPrcWriteHelperFree(A3DRWParamsPrcWriteHelper *pA3DRWParamsPrcWriteHelper)

Free PRC write helper.

Remark

Because this function does not return A3DStatus the internal thread safety policy is to wait for the availability of the API.

Version

3.0

Parameters

pA3DRWParamsPrcWriteHelper[inout] The helper to free.

A3DStatus A3DAsmModelFileExportToU3DFile(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExportU3DData *pParamsExportData, const A3DUTF8Char *pcCADFileName)

Writes a model file to a physical file in Universal 3D format.

This function writes the A3DAsmModelFile entity to a physical file.

Version

4.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pcCADFileName[in] References the path of the file into which the function stores the model file.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportToStepFile(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExportStepData *pParamsExportData, const A3DUTF8Char *pcCADFileName)

Writes a model file to a physical file in STEP format.

This function writes the A3DAsmModelFile entity to a physical file.

Version

3.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pcCADFileName[in] References the path of the file into which the function stores the model file.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportToJTFile(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExportJTData *pParamsExportData, const A3DUTF8Char *pcCADFileName)

Writes a model file to a physical file in JT format.

This function writes the A3DAsmModelFile entity to a physical file.

Version

6.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pcCADFileName[in] References the path of the file into which the function stores the model file.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportToVrmlFile(const A3DAsmModelFile *pA3DAsmModelFile, const A3DUTF8Char *pcCADFileName)

Writes a model file to a physical file in VRML format.

This function writes the A3DAsmModelFile entity to a physical file.

Version

6.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pcCADFileName[in] References the path of the file into which the function stores the model file.

Return values
  • A3D_INVALID_LICENSE

  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportToIgesFile(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExportIgesData *pParamsExportData, const A3DUTF8Char *pcCADFileName)

Writes a model file to a physical file in IGES format.

This function writes the A3DAsmModelFile entity to a physical file.

Version

3.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pcCADFileName[in] References the path of the file into which the function stores the model file.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportToStlFile(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExportStlData *pParamsExportData, const A3DUTF8Char *pcCADFileName)

Writes a model file to a physical file in STL format.

This function writes the A3DAsmModelFile entity to a physical file.

Version

3.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pcCADFileName[in] References the path of the file into which the function stores the model file.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportTo3mfFile(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExport3mfData *pParamsExportData, const A3DUTF8Char *pcCADFileName)

Writes a model file to a physical file in 3MF format.

This function writes the A3DAsmModelFile entity to a physical file.

Version

10.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pcCADFileName[in] References the path of the file into which the function stores the model file.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportToXMLFile(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExportXMLData *pParamsExportData, const A3DUTF8Char *pcXMLFileName, unsigned int *uMapSize, unsigned int **puMapXmlIds, A3DEntity ***ppMapProductOccurrences)

Writes a model file to a physical file in XML format.

This function writes the A3DAsmModelFile entity to a physical file, and fills two arrays of size uMapSize (puMapXmlId and ppMapProductOccurrences) that will act as a map of the product occurrences and their respective IDs in the XML file.

Version

7.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pcXMLFileName[in] References the path of the file into which the function stores the model file.

  • uMapSize[out] Size of the two following arrays. If set to NULL, the map construction is bypassed.

  • puMapXmlIds[out] Array of the product occurrence IDs in the XML file. If set to NULL, the map construction is bypassed. It has to be freed with the custom free memory callback.

  • ppMapProductOccurrences[out] Array of the product occurrences in the XML file. If set to NULL, the map construction is bypassed. It has to be freed with the custom free memory callback.

Return values
  • A3D_INVALID_LICENSE

  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportToObjFile(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExportObjData *pParamsExportData, const A3DUTF8Char *pcCADFileName)

Writes a model file to a physical file in OBJ format (with MTL for the materials).

This function writes the A3DAsmModelFile entity to a physical file.

Version

12.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pcCADFileName[in] References the path of the file into which the function stores the model file.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportToFbxFile(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExportFbxData *pParamsExportData, const A3DUTF8Char *pcCADFileName)

Writes a model file to a physical file in FBX format.

This function writes the A3DAsmModelFile entity to a physical file.

Version

12.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pcCADFileName[in] References the path of the file into which the function stores the model file.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DAsmModelFileExportToGltfFile(const A3DAsmModelFile *pA3DAsmModelFile, const A3DRWParamsExportGltfData *pParamsExportData, const A3DUTF8Char *pcCADFileName)

Writes a model file to a physical file in GLTF/GLB format.

This function writes the A3DAsmModelFile entity to a physical file.

Version

12.0

Parameters
  • pA3DAsmModelFile[in] References the A3DAsmModelFile to be written out.

  • pParamsExportData[in] References the parameters for export.

  • pcCADFileName[in] References the path of the file into which the function stores the model file.

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_WRITE_INVALID_FILE_NAME

  • A3D_WRITE_ERROR

  • A3D_WRITE_CANNOT_LOAD_WRITER

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code