How to Create a Plug-In

www.CAD6.com

CAD6 plug-ins can either be import filters, export filters, or command extensions of any kind. They integrate into CAD6studio, CAD6industrie, and CAD6starter, and have full access to the application's data and settings.

 

All CAD6 plug-ins have to have special file names: The plug-in's file name has to end with an underscore _ (Unicode 95), followed by the extension .DLL. All three types of plug-ins have to reside in the application's main path (i.e. in the same directory as the serving application mkcad6.exe). When starting, the serving application will search for all files matching *_.DLL and will try to install those files as plug-ins or filters (see Plug-In Style Guide).

 

Plug-in file names should start with a three-character identification of the plug-in's creator to avoid duplicate names. You will receive your private three-character identification at the time you contact Malz++Kassner in order to receive your unique owner identifier (see Getting Your Private Owner ID).

 

Import and export filters can be created with only basic knowledge of the external file format and some knowledge about geometrical calculations. You will find that especially creating export filters is very easy – if required, the application does all calculations for you and passes simple lines and polygons to the export filter. Please refer to the following chapters and to the Sample Source Code for more information.

 

The CAD6interface documentation is basically addressed to C++ developers with some experience in Win32/x64 programming, i.e. it assumes knowledge of the programming language C++ and of basic Win32/x64 topics. The CAD6interface may also be used with other compilers that are able to use the supplied MKI_LIB6.H and MKI_LIB6.LIB files and that can create C++ compatible dynamic link libraries (DLLs) for Win32 and/or x64. Anyway, we recommend the use of the latest version of Microsoft's Visual Studio (at least Version 2019) with a C++ tool set – the compiler that we use. It creates fast and robust code, and it has a powerful user interface that allows fast and easy development of complex projects.

 

Depending on the edition of CAD6 that a plug-in shall work with, it must either be compiled in Win32 (32-bit) or in x64 (64-bit) mode for Window 8 and higher. The interface usually does not distinguish between those different modes. Only pointers and references have different sizes.

 

When running in CAD6starter, some interface functions will not be supported. They exist, but will always return an error indication. To distinguish between the different editions of CAD6, use the MKI_GetApplicationType function. It will also inform you if the application is currently in test mode (aka trial), in demo (aka locked) mode, or in read-only (aka viewer) mode.

 

CAD6interface 2024.2 - Copyright 2024 Malz++Kassner® GmbH