After enabling readers you want to use, then starting the Dtk_API, you can call the Dtk_API::OpenDocument() method of the Dtk_API class to get a Dtk_MainDoc. It contains a root representing the Assembly Tree based on Dtk_Component.
You can get a corresponding image preview with GetPreview() method.
Dtk_API contains a file search engine to set your preferences for searching for files that are part of an assembly : How to use Search File Engine
Here is a model sample and its corresponding representation in Dtk_Component :
Each Dtk_Component has a type, a name and children.
There are 4 different types:
Virtual Component contains only children Prototype represents a model that can have 0 or several children. It must be referenced by an instance or a catalog (except if he is root).Instance has only one child which is the prototype and a placement matrix.Catalog has one or several children representing the different possibilities for an Assembly Tree (such as Scene in CatiaV5). Default is given by method GetDefaultChildInCatalog();.
Dtk_Component you have to call ReadComponent to get corresponding Construction Tree. Dtk_Component colors should prevail on any other defined colors A single blue Cube could be instantiated as green and red :
Dtk_Component upper level(Instance type)Dtk_Component child (Prototype type) or in Construction Tree (Dtk_Node). At screen, you'll see one red cube and one green cube.
Some formats allow both graphical and semantic representation.
If you need only data for visualisation you can call Dtk_API::OpenDocumentGraphic() method of the Dtk_API class to get a Dtk_MainDoc then call ReadComponentGraphic(); on the Dtk_Component; This method gives you a set of meshes for 3D files and a set of drawing for 2D files. Not all files contains such information so result may be empty : In this case you have to call ReadComponent to get all data.