Synopsis
PDX_MSGT pdx_GetFileType(long option, char *file_name, PDX_FILE_TYPE *file_type, void *file_info)
Purpose
Determines the file type (IGES, VDA-FS, DXF, STEP, MDA saved model, ACIS, unknown)
Description
This routine reads in a portion of the specified file and determines the file type. The determined file_type will be one of the following: .nf PDX_ACIS_ASCII PDX_ACIS_BINARY PDX_DXF_ASCII PDX_DXF_BINARY PDX_IGES_ASCII PDX_IGES_CASCII PDX_IGES_BINARY PDX_IGES_PIP PDX_MDA PDX_STEP PDX_VDAFS PDX_UNKNOWN .fi Additional information about the file is allocated and stored in file_info if the provided file is determined to be either IGES ASCII, DXF ASCII, ACIS ASCII, VDAFS, STEP, or an MDA saved model. This file_info must be freed by the application. If the application is not part of libpdx, pdx_Free must be used to free file_info. The following table identifies each file_type with its associated type definition for file_info:
.TS center box tab (/); l l . file_type /associated file_info typedef _ PDX_ACIS_ASCII /PDX_ACIS_FILE_INFO PDX_DXF_ASCII /PDX_DXF_FILE_INFO PDX_IGES_ASCII /PDX_IGES_FILE_INFO PDX_MDA /PDX_MDA_FILE_INFO PDX_STEP /PDX_STEP_FILE_INFO PDX_VDAFS /PDX_VDAFS_FILE_INFO .TE
.IP See pdx_Interface.h for the fields that are accessible for each of the available typedefs. .LP
Input
option
Options (not used)
file_name
Name of the file to be checked.
Output
file_type
Type of the file (see list of types above)
file_info
Associated file information - must be freed by the application, using pdx_Free if the application is not part of libpdx.
Return
PDX error code