VCGetCurrentEntityUserDataChunk
VCSetCurrentEntityUserDataChunk


Version:

1.2

Description:

User data may be attached to any drawing entity or to the drawing header and used for storage of entity information, drawing information, custom settings, or indices to external tables. This data can be assigned and retrieved from entities based on the data type and the specified index. A Chunk is a piece of data un-associated with any data type. Chunks are most useful for assigning string data to an entities user data. The size of the chunk must be predetermined prior to calling this function in order for the function to know how much data to pull out of memory at the location specified by the pointer.

Declaration:

 

C/C++

extern "C" void WINAPI VCGetCurrentEntityUserDataChunk(short* iError, short iIndex, char* p);
extern "C" void WINAPI VCSetCurrentEntityUserDataChunk(short* iError, short iIndex, void* p, short iSize);

Delphi

procedure VCGetCurrentEntityUserDataChunk(var iError: Smallint; iIndex: Smallint; p: PAnsiChar); stdcall;
procedure VCSetCurrentEntityUserDataChunk(var iError: Smallint; iIndex: Smallint; var p: Pointer; iSize: Smallint); stdcall;

ActiveX/COM

Function GetCurrentEntityUserDataChunk(ByVal iIndex As Integer) As Variant
Sub SetCurrentEntityUserDataChunk(ByVal iIndex As Integer, ByVal Byte_Array As Variant)

Parameters:

Index - the index number within the current entity where the chunk should be stored.
p
- a pointer to a memory location where the data chunk is stored.
iSize
- the size of the data chunk in bytes.

Notes:

These calls will not work until you first use VCAddCurrentEntityUserDataChunk to add data to the entity or header. For example, information on the number of entities in a drawing might be added to a drawing header. As the drawing changes, so will the information. Use VCSet/GetCurrentEntityUserDataChunk to update this information.

See Also:

VCAddCurrentEntityUserDataChunk, VCAddCurrentEntityUserDataByte, VCAddCurrentEntityUserDataDouble, VCAddCurrentEntityUserDataFloat, VCAddCurrentEntityUserDataLong, VCAddCurrentEntityUserDataShort, VCGetUserDataName, VCGetCurrentEntityUID, VCGetCurrentEntityUserDataByte, VCGetCurrentEntityUserDataCount, VCGetCurrentEntityUserDataDouble, VCGetCurrentEntityUserDataKind, VCGetCurrentEntityUserDataLong, VCGetCurrentEntityUserDataFloat, VCGetCurrentEntityUserDataShort, VCGetCurrentEntityUserDataString, VCGetCurEntUserDataChunkSize, VCSetEntityUserData, VCSetHeaderUserData