MKI_ExtAddDataBlock (Entity Creation)

www.CAD6.com

C++ Syntax

bool

MKI_ExtAddDataBlock(

 __int32 f_nType,

 __int16 f_nElemType,

 __int16 f_nElemCount,

 const void* const f_pData,

 const size_t f_nSize );

 

Adds a data block to a previously opened provisional extended object (see MKI_ExtOpen).

 

Parameters

f_nType

[__int32] Data block type.

If f_nElemType is MKI_DB_TYPE_NATIVE, this value must be one of the predefined native data block types (see MKI_DB_INFO_*).

If f_nElemType is MKI_DB_TYPE_POINT and f_nElemCount is 1, this value may be one of the predefined data block point types (see MKI_DB_POINT_*).

Valid range in all other cases: 1000 ≤ x ≤ 29999. Such a data block will not be modified by the serving application in any case and can be used to store plug-in-specific data.

f_nElemType

[__int16] Type of elements that are stored in the data block (see MKI_DB_TYPE_*).

f_nElemCount

[__int16] Number of elements that are contained in the data block. If f_nElemType is MKI_DB_TYPE_NATIVE, this value should always be zero. If f_nElemType is MKI_DB_TYPE_BINARY, this value should be identical to f_nSize. If f_nElemType is MKI_DB_TYPE_TEXT, this value should be at most half as much as f_nSize (use a negative value to force static allocation of the maximum text length, see MKI_BLOCK_TEXT). Valid range: 0 ≤ xMKI_DB_SIZE_MAX.

f_pData

[const void* const] Address of the data to be copied to the data block.

f_nSize

[const size_t] Total size of the data in bytes.

 

Return Value

Returns true if the data block was added successfully. If false is returned, this indicates that the extended object would be too large after adding this data block.

 

Comment

This is the generic command for adding data blocks to an extended object. If possible, use the specific commands instead to add the following data types:

MKI_ExtAddAttribute

MKI_ExtAddBinary

MKI_ExtAddDouble

MKI_ExtAddInt32

MKI_ExtAddPoint

MKI_ExtAddText

MKI_ExtAddXProperty

 

CAD6interface 2026.1 - Copyright 2026 Malz++Kassner® GmbH