EPI_createCustomEntity


The EPI_createCustomEntity function adds a custom entity to the model.


BOOL EPI_createCustomEntity (        HMODULE hEagle,           // Eagle handle     EPI_CUSTOM custom,        // Custom structure     EPI_ITEM  *handle         // Pointer to the unique ID );    

Parameters


hEagle

value of the Eagle handle, which can be obtained through the EPI_getEagleHandle function.


custom

structure containing all relevant information for the new custom entity.


handle

pointer to the unique ID of the new item.

Return Value

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE.

Remarks

The data structure to support the new entity has the following format:


typedef struct
{
EPI_ITEM_HEADER header; /* item header */
double    pos[3];       /* the position of the Custom        */
double    strfac[3];    /* stretching factors of the Custom  */
double    rot[3][3];    /* the post-mult rotation matrix      */
double    max[3];       /* maximum coordinates of the Custom  */
double    min[3];       /* minimum coordinates of the Custom  */
int       rottra;       /* rotated/not(1/0) + 2*trans for the Custom entity */
int       pen;          /* Simbology info (pen,dash & thick)  */
int       colour;       /* Colour fill                        */
int       hatch;        /* Hatch                              */
int       ctype;        /* Ctype of the Custom entity         */
int       dummy;        /* For future use                     */
int       size;         /* Size of the payload, in bytes      */
void      *payload;     /* Custom data                        */
} EPI_CUSTOM, *LP_EPI_CUSTOM;

See Also

EPI_getEagleHandle