API Reference > Classes > OdMvdXmlHostAppServices Class > OdMvdXmlHostAppServices Methods > OdMvdXmlHostAppServices::findFile Method
OdMvdXmlHostAppServices::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, the file search is not related to a database.  
FindFileHint hint = kDefault 
[in] A hint that indicates the type of file that is required.  

Returns the full path to the found file; if the file was not found, the method returns an empty string.

Searches for a specified file.

This method is called by IFC SDK when it needs to get access to a file, such as a font file, a template file, etc. If the pDb parameter value is not equal to NULL, it is possible to call the getFilename() method of the database instance to determine the full path to the IFC file associated with the database. The typical search order is the following: 

 

  • 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 platforms).

 

The hint parameter's value 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-2021. Open Design Alliance. All rights reserved.