MKI_PlugInNotify (Callback) Renamed in Version 2020.2

www.CAD6.com

C++ Syntax

__int32

MKI_PlugInNotify(

 MKI_ENTITY_EXT_PTR f_pExt,

 __int32 f_nNotifyMode,

 void* f_pData );

 

typedef __int32

(*MKI_PLUGINNOTIFY_PROC)(

 MKI_ENTITY_EXT_PTR f_pExt,

 __int32 f_nNotifyMode,

 void* f_pData );

 

This procedure is called in many different cases:

 

1.The plug-in shall be notified that an extended object potentially handled by this plug-in was or is about to be loaded, created, duplicated, modified, or deleted.

2.The plug-in shall be notified that a property editing process of objects is starting, in progress, or finished.

3.The plug-in shall be notified of a special user input (such as snapping or identification) to react accordingly.

4.The plug-in shall be notified that the screen is about to be redrawn so that it can add information to the screen.

5.The serving application needs information about extended objects potentially handled by this plug-in.

6.The serving application needs information about collection or pinboard items potentially handled by this plug-in.

 

Cases 1 through 5 only occur for standard plug-ins, case 6 can also accur for import and export filters if they create custom collection and/or the pinboard items.

 

Parameters

f_pExt

[MKI_ENTITY_EXT_PTR] Address of the plug-in-supplied extended object that is to be modified (in most cases) or nullptr (in all other cases). The interpretation depends on the value of f_nNotifyMode, see MKI_NOTIFY_*.

If not nullptr, the plug-in should check the values in f_pExt->Header.UnitOwner and f_pExt->ExtType on whether it knows this extended object or not. If not, the plug-in should immediately exit returning MKI_NOTIFY_RESULT_UNKNOWN.

f_nNotifyMode

[__int32] Value defining the action to be performed on the plug-in-supplied extended object, see MKI_NOTIFY_*.

f_pData

[void*] Address of modification-related data. The interpretation depends on the value of f_nNotifyMode, see MKI_NOTIFY_*.

 

Return Value

Should return one of the following values:

 

MKI_NOTIFY_RESULT_UNKNOWN

The plug-in does not know the extended object f_pExt.

 

MKI_NOTIFY_RESULT_IGNORE

The plug-in knows the extended object f_pExt, but the modification stated in f_nNotifyMode is not supported or was cancelled by the user.

 

MKI_NOTIFY_RESULT_DONE Changed in Version 2020.2

The plug-in knows the extended object f_pExt and has executed the modification stated in f_nNotifyMode successfully. Must not be used for MKI_NOTIFY_EDIT_TEXT!

 

MKI_NOTIFY_RESULT_COPY New in Version 6.10

The plug-in knows the extended object f_pExt and has executed the modification stated in f_nNotifyMode successfully. This return value also implies that the plug-in has created a new extended object that shall replace the original one.

 

MKI_NOTIFY_RESULT_FAIL New in Version 6.50

An error occurred during MKI_NOTIFY_EXT_CHECK (usually due to memory limitation or file format errors), the loading process shall be canceled.

 

Comment

The name of the procedure has to be exactly MKI_PlugInNotify .

 

CAD6interface 2024.2 - Copyright 2024 Malz++Kassner® GmbH