MKI_EnumeratePageRect (Enumeration) Changed in Version 2022.1

www.CAD6.com

C++ Syntax

MKI_RESULTVALUE

MKI_EnumeratePageRect(

 __int32 f_nEnumFlag1,

 __int32 f_nEnumFlag2,

 __int64 f_nEnumMode,

 MKI_ENUMOBJECT_PROC f_fnCallBack,

 MKI_CONST_RECT_PTR f_pPageRect,

 __int32 f_nPageIndex,

 void* f_pUserData );

 

Starts an enumeration stream. This stream enumerates all objects and instances of the current drawing within a given rectangle, depending on EnumFlag1, EnumFlag2 and EnumMode, and based on a given page number.

 

Parameters

EnumFlag1

EnumFlag2

[__int32] Two flag combinations used to filter special entities for the enumeration. The enumeration will only include entities where the following boolean expression is true:

( (Entity->Header.Flag & EnumFlag1 ) == EnumFlag2 )

Both values can be a bit-wise OR combination of MKI_FLAG_* flags. Typical combinations of EnumFlag1 and EnumFlag2 are:

EnumFlag1 = MKI_FLAG_SELECT, EnumFlag2 = MKI_FLAG_SELECT

Enumerate only permanently selected entities.

EnumFlag1 = MKI_FLAG_USE, EnumFlag2 = MKI_FLAG_USE

Enumerate only identified entities.

EnumFlag1 = MKI_FLAG_USE | MKI_FLAG_LOCKED | MKI_FLAG_NODISPLAY, EnumFlag2 = MKI_FLAG_USE

Enumerate only identified entities that are neither invisible nor locked.

EnumMode

[__int64] This value determines the way that entities are enumerated. It indicates what types of geometrical data the plug-in can handle, and what type of entities shall be enumerated. It can be a bit-wise OR combination of multiple flags (see MKI_ENUM_*).

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.

PageRect

[MKI_CONST_RECT_PTR] Rectangular area that limits the enumeration (usually the current page's surrounding frame). Only objects and instances reaching into this area will be enumerated. If PageRect is nullptr, it will be ignored. This area limitation can be combined with the MKI_ENUM_WINDOW flag. The objects will not be actually clipped, i.e. any object reaching into the area will be enumerated completely. On how to clip some elements of the enumeration data, see MKI_ENUMDEF_DATA::ClipToRectangle.

PageIndex

[__int32] Number of the page that shall be "active" during the enumeration (-1 for Model Space), influencing the visibility of objects if MKI_ENUM_VISIBLE is set and MKI_ENUM_HIDDEN is not.

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