DATAKIT API  V2025.1
How to use Dtk_API Class

Dtk_API is a singleton.
You have to Enable the readers you want to use and then Start the API. When API is started you can Use OpenDocument() method to read a file.
This method recognizes file format and calls corresponding Dtk_Reader. You have to close the opened document with EndDocument() method to free data used by the reader. At the end, you need to stop the API.

Sample:

//First You have to Enable the readers you want to use
//Then You have to Start DATAKIT API
Dtk_ErrorStatus errorStatus = dtkNoError;
Dtk_API * MyAPI = Dtk_API::StartAPI(TemporaryWorkingDirectory, errorStatus);
if(MyAPI == NULL)
{
printf("Can't Start DATAKIT API\n");
return errorStatus;
}
//And Open Document
MyAPI->OpenDocument(inInputFile, TmpDoc);
//Your function to write the document .....
//We close the opened document
err = MyAPI->EndDocument(TmpDoc);
//At the end you stop DATAKIT API


ObjReader::Enable
static Dtk_bool Enable()
Dtk_API::EndDocument
Dtk_ErrorStatus EndDocument(Dtk_MainDocPtr &inoutDocument)
Close a Document.
CgrReader::Enable
static Dtk_bool Enable()
SmgReader::Enable
static Dtk_bool Enable()
NavisReader::Enable
static Dtk_bool Enable()
LavaReader::Enable
static Dtk_bool Enable()
JtReader::Enable
static Dtk_bool Enable()
CgmReader::Enable
static Dtk_bool Enable()
GltfReader::Enable
static Dtk_bool Enable()
StlReader::Enable
static Dtk_bool Enable()
SwReader::Enable
static Dtk_bool Enable()
_3dmReader::Enable
static Dtk_bool Enable()
CerconReader::Enable
static Dtk_bool Enable()
Dtk_API::StartAPI
static Dtk_API * StartAPI(const Dtk_string &inTemporyDirectory, Dtk_ErrorStatus &outErrorCode, const Dtk_string &inCustomerID=Dtk_string())
Start DATAKIT API.
F3dReader::Enable
static Dtk_bool Enable()
PlmXmlReader::Enable
static Dtk_bool Enable()
CatiaV4Reader::Enable
static Dtk_bool Enable()
StepReader::Enable
static Dtk_bool Enable()
Dtk_API::OpenDocument
Dtk_ErrorStatus OpenDocument(const Dtk_string &inInputFile, Dtk_MainDocPtr &outDocument)
Open a Document (call EndDocument to close it)
RevitReader::Enable
static Dtk_bool Enable()
ProeReader::Enable
static Dtk_bool Enable()
CaddsReader::Enable
static Dtk_bool Enable()
DwgReader::Enable
static Dtk_bool Enable()
InvReader::Enable
static Dtk_bool Enable()
ProCeraReader::Enable
static Dtk_bool Enable()
UgReader::Enable
static Dtk_bool Enable()
CatiaV5Reader::Enable
static Dtk_bool Enable()
IgesReader::Enable
static Dtk_bool Enable()
CatiaV6Reader::Enable
static Dtk_bool Enable()
IfcReader::Enable
static Dtk_bool Enable()
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
DcmReader::Enable
static Dtk_bool Enable()
PsReader::Enable
static Dtk_bool Enable()
CerecReader::Enable
static Dtk_bool Enable()
CreoviewReader::Enable
static Dtk_bool Enable()
FbxReader::Enable
static Dtk_bool Enable()
Dtk_API::StopAPI
static void StopAPI(Dtk_API *&inAPI, Dtk_bool inWriteTimeInLog=1)
Stop DATAKIT API.
dtkNoError
@ dtkNoError
Definition: error_dtk.hpp:140
VdaReader::Enable
static Dtk_bool Enable()
SolidEdgeReader::Enable
static Dtk_bool Enable()
Dtk_API
Definition: dtk_api.hpp:75
AcisReader::Enable
static Dtk_bool Enable()