MKI_PLUGIN_ID (Basic Classes) Changed in Version 2024.1

www.CAD6.com

C++ Syntax

class MKI_PLUGIN_ID

{

  public:

 

  __int16 m_nOwnerID,

          m_nPlugInID;

  __int32 m_nPlugInCTRL;

  MKI_PLUGIN_CONTAINER* m_pContainer;

  MKI_PLUGIN_PROC m_cPlugInProc;

  MKI_COMMAND_DATA m_cPlugInData;

  MKI_COMMAND_DATA* m_pCommandData;

  MKI_BUTTON_DATA* m_pButtonData;

  MKI_EXTENDED_DATA* m_pExtendedData;

  LPWSTR m_pszFileType,

         m_pszFileExtension,

         m_pszFileDefault;

  __int32 m_nOptionsOwnerID,

          m_nOptionsItemType,

          m_nExportCapabilities;

 

  void

  Init( void );

};

 

This structure contains a plug-in's complete command description. This structure list all commands supplied by the plug-in and states the callback procedures required to handle these commands.

 

Element Description

m_nOwnerID

[__int16] This value is a unique identification of the creator of the plug-in. The value MKI_DB_OWNER_MK is reserved for use by Malz++Kassner. Valid range: 0 <= Value < 10000.

Third-party vendors that plan to implement a plug-in should contact Malz++Kassner to receive their unique identification (see Getting Your Private Owner ID).

m_nPlugInID

[__int16] This value is a plug-in identification. This value can freely be managed by the plug-in's creator. Be sure to keep this ID unique over all plug-ins created. This is important to avoid interference between two plug-ins of the same creator.

m_nPlugInCTRL

[__int32] This value determines on which versions of the application this plug-in will run on (see MKI_PLUGINCTRL_*).

m_pContainer New in Version 6.40

[MKI_PLUGIN_CONTAINER*] This structure contains general information about the plug-in. If the plug-in wants to participate in the automated online update process, this address must be set to a valid structure containing correct data. Otherwise, it can be set to nullptr.

m_cPlugInProc Changed in Version 6.31

[MKI_PLUGIN_PROC] This structure contains the addresses of callback procedures required to handle user input during the execution of plug-in-defined command.

m_cPlugInData

[MKI_COMMAND_DATA] This structure contains information about the plug-in's main menu entry and its icon. The use of this information depends on the stated PlugInData->Type:

 

MKI_PLUGINMENU_CUSTOM

In this case, PlugInData contains the description of the menu and its menu icon. CommandData should contain further valid command descriptions to build the menu.

 

MKI_PLUGINMENU_FILE

MKI_PLUGINMENU_EDIT

MKI_PLUGINMENU_MANAGE Renamed in Version 2023.1

MKI_PLUGINMENU_MODIFY Renamed in Version 2023.1

MKI_PLUGINMENU_DRAW

MKI_PLUGINMENU_GEO

MKI_PLUGINMENU_TRIM

MKI_PLUGINMENU_TEXT Renamed in Version 2023.1

MKI_PLUGINMENU_LIB

MKI_PLUGINMENU_EXTRA

MKI_PLUGINMENU_HELP

In these cases, PlugInData contains the description of the command that is to be added to the top level of the corresponding menu. If CommandData contains further valid command descriptions, this command will serve as the popup menu label, else it will be a standard menu item.

 

MKI_PLUGINMENU_IMPORT

MKI_PLUGINMENU_EXPORT

In these cases, PlugInData contains the one and only command that the filter offers. Import and export filters are not allowed to create custom menus or submenus! In these cases, CommandData should be set to nullptr.

 

MKI_PLUGINMENU_NONE

In this case, PlugInData and CommandData will be ignored.

 

In the first three cases, the resulting command identifier of this command is zero. Commands stored in CommandData receive command identifiers beginning with one.

m_pCommandData

[MKI_COMMAND_DATA*] This array contains information about the plug-in's custom menu or submenu entries and their icons. The use of this information depends on the stated PlugInData->Type:

 

MKI_PLUGINMENU_CUSTOM

In this case, CommandData contains the description of the commands and submenus to be listed in the custom menu.

 

MKI_PLUGINMENU_FILE

MKI_PLUGINMENU_EDIT

MKI_PLUGINMENU_MANAGE Renamed in Version 2023.1

MKI_PLUGINMENU_MODIFY Renamed in Version 2023.1

MKI_PLUGINMENU_DRAW

MKI_PLUGINMENU_GEO

MKI_PLUGINMENU_TRIM

MKI_PLUGINMENU_TEXT Renamed in Version 2023.1

MKI_PLUGINMENU_LIB

MKI_PLUGINMENU_EXTRA

MKI_PLUGINMENU_HELP

In these cases, CommandData contains command descriptions to be listed in a submenu.

 

MKI_PLUGINMENU_IMPORT

MKI_PLUGINMENU_EXPORT

In these cases, CommandData should be to nullptr.

 

MKI_PLUGINMENU_NONE

In this case, CommandData should be nullptr.

 

In the first two cases, the resulting command identifiers of these commands begin with 1, going up to MKI_PLUGIN_MENU_MAX.

m_pButtonData New in Version 6.30

[MKI_BUTTON_DATA*] This array contains information about the plug-in's custom buttons and their icons. ButtonData can be set to nullptr if no buttons are used. The allowed maximum number of entries is MKI_PLUGIN_BUTTON_MAX.

The resulting button identifiers of these buttons begin with zero, going up to MKI_PLUGIN_BUTTON_MAX - 1 at most.

Import and export filters must not define buttons and must set ButtonData to nullptr.

m_pExtendedData New in Version 6.31

[MKI_EXTENDED_DATA*] This list contains information about the plug-in's extended objects and their descriptions. ExtendedData can be set to nullptr if no extended objects are used (or if they shall not be used individually). The allowed maximum number of entries is MKI_PLUGIN_EXT_MAX. The list shall be ended with an entry where OwnerID is set to a negative value.

Import and export filters must not define extended objects and must set ExtendedData to nullptr.

m_pszFileType

[LPWSTR] If the plug-in is either an import or export filter, this string must contain a description of the file type it handles. The string should contain both the file type's name and its standard extensions, e.g. "HTML Hypertexts (*.htm;*.html)".

If the plug-in is neither an import nor export filter, FileType should be set to nullptr.

m_pszFileExtension

[LPWSTR] If the plug-in is either an import or export filter, this string must contain a set of extensions that this filter can handle. The string should contain the file extensions to be listed in the file selection dialog, separated by semicolons, e.g. "*.htm;*.html".

If the plug-in is neither an import nor export filter, FileExtension should be set to nullptr.

m_pszFileDefault

[LPWSTR] If the plug-in is either an import or export filter, this string contains the default extension that shall be appended to any file name that does not have an extension, e.g. "htm". If no extension shall be appended, FileDefault should point to an empty string.

If the plug-in is neither an import nor export filter, FileDefault should be set to nullptr.

m_nOptionsOwnerID New in Version 2022.2

[__int32] If the plug-in is an export filter, this value is a unique identification of the creator of collections items used to store options for the export. Will usually be the same value as m_nOwnerID. The value MKI_DB_OWNER_MK is reserved for use by Malz++Kassner. Valid range: 0 <= Value < 10000. Set to a negative value if not applicable (no options can be stored).

m_nOptionsItemType New in Version 2022.2

[__int32] If the plug-in is an export filter, this value is an internal identification of the collection items used to store options for the export. This value is known only to the creator of that item. In combination with the owner's identification, this unambiguously identifies a certain type of collection item. Set to a negative value if not applicable (no options can be stored).

m_nExportCapabilities New in Version 2024.1

[__int32] If the plug-in is an export filter, this value contains a bit-wise OR combination of export capabilities. Defined values are:

 

MKI_EXPORTCAPABILITIES_BASIC (0x00000000)

The export filter can handle all basic capabilities and classic mode, i.e. it can export a selected set of plain objects or all objects in classic mode.

 

MKI_EXPORTCAPABILITIES_LAYOUT (0x00000001)

The export filter can also handle the layout mode, i.e. it can export objects of the separate model space and all pages individually at once.

 

CAD6interface 2024.2 - Copyright 2024 Malz++Kassner® GmbH