Object ProDocument

Function ProDocumentFileContentsRead


Description
Reads the contents of a short file from a location on disk or in Windchill.

Note: Not intended for CAD model files.

Synopsis
#include <ProUtil.h>
ProErrorProDocumentFileContentsRead(
ProPath source_file
/* (In)
The path to the file, provided by functions such as ProFileMdlnameOpen() and ProFileMdlfiletypeOpen().
*/
ProPath document_name
/* (In)
If present, the name of the document, with source_file being the name of the secondary content on the document. If NULL, read the primary content of source_file. Ignored for non-Windchill locations.
*/
ProArray* contents
/* (Out)
A ProArray of chars from the file, which caller must free using ProArrayFree().
*/
)
Returns
PRO_TK_NO_ERRORThe function succeeded.
PRO_TK_BAD_INPUTSOne or more inputs was invalid.
PRO_TK_INVALID_FILEThe input file was not found or improper.
PRO_TK_MAX_LIMIT_REACHEDFile was longer than ProArrayMaxCountGet(sizeof(char).
PRO_TK_CANT_ACCESSNo permission to read the input file.
PRO_TK_UNSUPPORTEDNot supported for CAD models.
PRO_TK_GENERAL_ERRORThe function failed.

Manual References:

  1. Data Management: Windchill Operations: File Copy