API Reference > Classes > PRC Base Classes > OdPrcHostAppServices Class > OdPrcHostAppServices Methods > OdPrcHostAppServices::findFile Method
OdPrcHostAppServices::findFile Method
Syntax
C++
virtual OdString findFile(const OdString& filename, OdDbBaseDatabase* pDb = 0, FindFileHint hint = kDefault);
Parameters 
Description 
const OdString& filename 
[in] A name of the file to find.  
OdDbBaseDatabase* pDb = 0 
[in] A pointer to the database context. If the parameter value is equal to NULL, then the file search is not related with a database.  
FindFileHint hint = kDefault 
[in] A hint that indicates the type of file that is required. 

Returns the fully qualified path to the specified file. 

 

Returns an empty string if the file is not found. 

This method is called by PRC SDK when access is needed to a file, such as a font file, a template file, etc. 

If pDb parameter value is not equal to NULL, call pDb->getFilename() to determine the path to the .prc file associated with the database. 

The typical search order is as follows: 

 

  • The file name itself.
  • The current directory.
  • The drawing directory (for shx font, image, and xref files).
  • The Windows fonts directory (only for TTF fonts on Windows).

 

The hint parameter must be one of the following: 

 

Name 
Value 
Description Extension 
kDefault 
Any file. any 
kFontFile 
Can be either SHX or TTF file. SHX or TTF 
kCompiledShapeFile 
SHX file. SHX 
kTrueTypeFontFile 
TTF file. TTF 
kEmbeddedImageFile 
Image file. ISM 
kXRefDrawing 
External reference file. 
kPatternFile 
Pattern file (PAT) PAT 
kDRXApplication 
DRX application file. DRX 
kFontMapFile 
FontMap file. FMP 
Copyright (c) 2002-2020. Open Design Alliance. All rights reserved.