MKI_EnumerateLibrary (Enumeration) Changed in Version 2022.1

www.CAD6.com

C++ Syntax

MKI_RESULTVALUE

MKI_EnumerateLibrary(

 const LPCWSTR f_pszLibraryName,

 __int64 f_nEnumMode,

 MKI_ENUMOBJECT_PROC f_fnCallBack,

 void* f_pUserData );

 

Enumerates all blocks defined in a library.

 

Parameters

LibraryName

[const LPCWSTR] Title of the library to be enumerated. This library title can be retrieved by means of the MKI_LibraryGetInfo procedure. If you want to enumerate the blocks defined in a drawing, set this value to MKI_BLOCK_ID.

EnumMode Changed in Version 6.60

[__int64] This value determines the way that entities are enumerated. When enumerating a library, only two enumeration modes are available:

 

MKI_ENUM_NATIVE

If this flag is set, all blocks will be enumerated in native form, ie. only the address of the block will be passed.

 

MKI_ENUM_USED_BLOCKS

If this flag is set, the procedure will list all blocks found. This can be used by the plug-in to find out what blocks are used in the entities to be enumerated.

 
Either MKI_ENUM_NATIVE or MKI_ENUM_USED_BLOCKS have to be set! If both are set, only the native data will be passed.

CallBack

[MKI_ENUMOBJECT_PROC] Callback procedure for an object enumeration. This procedure will be called for every enumeration step. For a detailed description of object enumeration, see also the description of the MKI_EnumObjectProc procedure.

UserData

[void*] This pointer will be passed to all callback procedures that are called during the enumeration. You can use this parameter to pass "local" data to the enumeration, preferably by passing a pointer to a local data structure containing all information the callback procedure requires.

 

Return Value Changed in Version 2022.1

Enumeration result as a bitwise-or combination of flags (see MKI_RESULT_*). Some results indicate minor problems and do NOT mean that the enumeration was stopped or unsuccessful!

 

Comment

For a detailed description of entity enumeration, see the description of the corresponding callback procedure MKI_EnumObjectProc.

 

CAD6interface 2024.2 - Copyright 2024 Malz++Kassner® GmbH