Close

Relief for ODA Team in Ukraine

Learn more
ODA IFC SDK
OdIfcHostAppServices::findFile Method
Syntax
C++
virtual OdString findFile(const OdString& filename, OdDbBaseDatabase* pDb = 0, FindFileHint hint = kDefault);

Searches for a specified file.

Parameters
Description
filename
[in] A name of the file to find.
pDb
[in] A pointer to the database context. If the parameter value is equal to NULL, the file search is not related to a database.
hint
[in] A hint that indicates the type of file that is required.

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

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 pointer to the database context 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
0
Any file. any
kFontFile
1
Can be either SHX or TTF file. SHX or TTF
kCompiledShapeFile
2
SHX file. SHX
kTrueTypeFontFile
3
TTF file. TTF
kEmbeddedImageFile
4
Image file. ISM
kXRefDrawing
5
External reference file.
kPatternFile
6
Pattern file (PAT). PAT
kDRXApplication
7
DRX application file. DRX
kFontMapFile
8
FontMap file. FMP
Copyright © 2002-2022. Open Design Alliance All rights reserved.