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,

 __int32 f_nBytes );

 

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

 

Parameters

Type

[__int32] Data block type. If ElemType is MKI_DB_TYPE_NATIVE, this value must be one of the predefined native data block types (see MKI_DB_INFO_*).

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

In all other cases, Type may have any value between 1000 and 29999 inclusive. 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.

ElemType

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

ElemCount

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

Data

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

Bytes

[__int32] 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 2024.2 - Copyright 2024 Malz++Kassner® GmbH