KitchenDraw SDK2
The SDK2 is a .NET assembly that allows third-party programmers to extend KitchenDraw and to get access to the data available in KitchenDraw from other applications. With the SDK2, you can use familiar technologies like C#, .NET to interact with the KitchenDraw and to extend it in several ways.
The SDK2 can be used to perform the following tasks (the list is not exhaustive):
- Generating or updating KitchenDraw catalogs
- Generating paper catalogs or online catalogs from KitchenDraw catalogs
- Generating order files for suppliers
- Creating configurators for highly parametric objects (wardrobes, libraries, sliding doors, etc),
- Interfacing KitchenDraw with other software or informational systems (e.g. dedicated to quoting, point of sales management, ERP, production control softwares, etc.)
- Augmenting or modyfing KitchenDraw behavior by reacting on events occuring in KitchenDraw (like opening a scene, deleting an object, closing program, etc) your own way
- Extending by adding your custom features as menu items in KitchenDraw
- Modifing or replacing standard KitchenDraw dialog boxes
- Writing commercial rules and attaching them to catalog blocks (more precisely, writing functions executed when specific actions like placement, deletion, move, resizing, modification, activation, etc. are applied to objects in scene created from your catalog blocks)
Class Overview
The SDK2 defines four main classes, dedicated to different functionalites of the KitchenDraw application:
- Appli class gives access to the application global data: language, menus, catalog files, sites, users, suppliers, plugins, etc.
- Scene class gives read and write access to the scene content (e.g. objects, view points, generic finishes, headings,...) and provides methods to interact with them. This class handles some of the functions of the KitchenDraw user interface when a scene is opened (these can be found in the File, Edit, Selection, Object, Zoom, View menus).
- Catalog class gives read and write access to the catalog which is loaded in memory.
- Dico class allows to read and write information into the DICO.LNG dictionary file which is used to translate the KitchenDraw user interface.
These classes and their subclasses altogether provide more than 1000 members to you had an access to nearly every KitchenDraw feature programmatically.
Below you'll find a clickable diagram for each main class. Tooltips contain some additional information.
Writing KitchenDraw Plugins With SDK2
A KitchenDraw plugin is merely a .NET assembly which contains Plugin
class with methods to be called by KitchenDraw when certain event occur. For example, OnAppStartAfter
method of the class will called automatically each time KitchenDraw launches - assuming that your assembly complies several naming rules and is registered properly in KitchenDraw.
KitchenDraw plugins always have access to the current application session since they are run by the KitchenDraw application itself. Just create an instance of KD.SDK2.Appli class in your plugin to get the access to KitchenDraw.
When an object of the Appli class is created, the session associated with the object is the KitchenDraw default session. That means that if you create multiple instances of the Appli class they all will get the same shared application session.
You can learn more about KitchenDraw plugins from this article.