![]() |
MKI_PlugInImport (Callback) Renamed in Version 2015.0 |
www.CAD6.com |
C++ Syntax__int32 MKI_PlugInImport( const LPCWSTR f_pszFileName __int32 f_nFilterMode, void* f_pData );
typedef __int32 (*MKI_PLUGINIMPORT_PROC)( const LPCWSTR f_pszFileName, __int32 f_nFilterMode, void* f_pData );
This procedure is called each time the serving application wants to load a non-MKD drawing. The plug-in should then determine whether it can handle this file and load it if possible.
Parametersf_pszFileName [const LPCWSTR] Name of the file that contains the unknown drawing. f_nFilterMode [__int32] A bit-wise OR combination of special filter modes. It can be any combination of the following values:
MKI_FILTERMODE_NULL No special mode.
MKI_FILTERMODE_MERGE The drawing shall be added to the current drawing data. This is the same behavior as when importing on explicit user command. The plug-in should create its own undo level using MKI_UndoInitProcess, MKI_UndoCancelProcess and MKI_UndoFinishProcess.
MKI_FILTERMODE_NO_ERROR The import filter shall not display any (interrupting) messages in case of errors and no interrupting user interaction. This mode is used, for example, when an unknown type of file shall be checked by the plug-in or during automatic conversion processes. If successful (return value MKI_IMPORT_OK), the imported data will be used. In case of error (return value MKI_IMPORT_UNKNOWN or MKI_IMPORT_ERROR), the imported data will be discarded and the next import filter will be called.
MKI_FILTERMODE_NO_FEEDBACK New in Version 2025.1 The export filter shall not display any (non-interrupting) progress indication dialogs or other optical feedback. This mode is used for automatic conversion processes.
MKI_FILTERMODE_NO_REDRAW Renamed in Version 2025.1 The import filter is called by the auto-converter in batch operation, i.e. it shall not redraw the drawing data or any window contents after a successful import. This can significantly speed up the conversion of many files at once in an automated process. f_pData New in Version 2013.0 [void*] Pointer to a set of plug-in-specific import options. Please refer to the plug-in's documentation for details (both data structure and interpretation). May be nullptr to indicate "use default options".
Return ValueShould return one of the following values:
MKI_IMPORT_OK The plug-in knows this type of file and was able to load the file successfully.
MKI_IMPORT_UNKNOWN The plug-in does not know this type of file. The serving application will ask all other filters whether they know this type of file.
MKI_IMPORT_ERROR The plug-in knows this type of file, but an error occurred during the attempt to load it.
CommentThe name of the procedure has to be exactly MKI_PlugInImport.
|
CAD6interface 2025.1 - Copyright 2025 Malz++Kassner® GmbH