DATAKIT API  V2025.1
How to use Search File Engine


By default, Dtk_API imitate the default software behavior to find file inserted in assembly.
The search file engine allow you to :

  • set your own priorities between following paths : LocalSearch ReadPathSearch AdditionalPathSearch RelativePathSearch BelowPathSearch AbovePathSearch
  • add some search paths

You need first to activate the SearchFileEngine :

To use priorities you need to remove default priority first

Then activate the path and the priority order : (0 is the first)

MyAPI->SetLocalPathSearchFlag(DTK_TRUE); // activate the search with the local path from the root file.
MyAPI->SetInternalReadPathSearchFlag(DTK_TRUE); // activate the search with the full path read from the file.

To add other search paths with recursivity or not then activate and set priority:

MyAPI->SetAdditionnalPathSearchFlag(DTK_TRUE); // activate the additionnal path search method


Dtk_SearchFileEnum::ReadPathSearch
@ ReadPathSearch
Definition: dtk_api.hpp:54
Dtk_API::AddSearchPath
Dtk_ErrorStatus AddSearchPath(const Dtk_SearchFileEnum::RecursivityEnum &inRecursivityEnum, const Dtk_string &inPath)
Add search path to find missing files.
Dtk_SearchFileEnum::RootFolderFirstRecursivity
@ RootFolderFirstRecursivity
Definition: dtk_api.hpp:48
DTK_TRUE
#define DTK_TRUE
Definition: define.h:727
Dtk_API::ActivateSearchFileEngine
void ActivateSearchFileEngine()
Dtk_API::ManageSearchFile
void ManageSearchFile(Dtk_SearchFileEnum::Status inStatus)
Dtk_SearchFileEnum::AdditionalPathSearch
@ AdditionalPathSearch
Definition: dtk_api.hpp:55
Dtk_API::SetSearchPositionMode
Dtk_ErrorStatus SetSearchPositionMode(Dtk_Int32 inPosition, Dtk_SearchFileEnum::PriorityModeEnum inSearchEnum)
Set Search Position.
Dtk_SearchFileEnum::LocalSearch
@ LocalSearch
Definition: dtk_api.hpp:53
Dtk_API::SetInternalReadPathSearchFlag
void SetInternalReadPathSearchFlag(Dtk_bool inActivationFlag)
Allow Internal Read Path Search for files of assembly.
Dtk_SearchFileEnum::Enable
@ Enable
Definition: dtk_api.hpp:63
Dtk_API::ClearSearchPriority
Dtk_ErrorStatus ClearSearchPriority()
Clear Search Priority.
Dtk_API::SetAdditionnalPathSearchFlag
void SetAdditionnalPathSearchFlag(Dtk_bool inActivationFlag)
Allow Additionnal Path Search for files of assembly.
Dtk_API::SetLocalPathSearchFlag
void SetLocalPathSearchFlag(Dtk_bool inActivationFlag)
Allow Local Path Search for files of assembly.