HM_ExtAPI::ComponentGetColor()

Returns the color of the component.

Syntax

bool ComponentGetColor(
const HM_EntityComponent& comp,
HM_Color& std_color
HM_RGBColorStruct* rgb
);

Type

HyperMesh Ext API Function

Description

If the parameter rgb is not NULL then it returns red, green and blue values specifying the component color. The values in rgb are returned not only for HM_COLOR_USE_RGB but for any returned value of the parameter std_color.

If the function succeeds, the return value is true.If the function fails, the return value is false. To get extended value information, call HM_ExtAPI::GetLastErrorCode().

Requires including hm_extapi.h.

Inputs

comp
[in] - Handle to component object that was returned by previous calls to API functions.
name
[in] - Pointer to the string that contains the name for the new component. If the pointer is NULL then new the name is created automatically.
std_color
[in] - Returns the color of the component. The parameter can have one of following values.
HM_COLOR_GREY - The component has grey color.
HM_COLOR_BROWN - The component has brown color.
HM_COLOR_PURPLE- The component has purple color.
HM_COLOR_PINK - The component has pink color.
HM_COLOR_LTMAGENTA - The component has light magenta color.
HM_COLOR_MAGENTA - The component has magenta color.
HM_COLOR_BLUE - The component has blue color.
HM_COLOR_LTBLUE - The component has light blue color.
HM_COLOR_CYAN - The component has cyan color.
HM_COLOR_GREEN- The component has green color.
HM_COLOR_LTGREEN - The component has light green color.
HM_COLOR_YELLOW - The component has yellow color.
HM_COLOR_LTBROWN - The component has light brown color.
HM_COLOR_ORANGE - The component has orange color.
HM_COLOR_RED - The component has red color.
HM_COLOR_WHITE - The component has white color.
HM_COLOR_USE_RGB - The color of the component does not match standard colors from HyperMesh palette. The red, green and blue values specifying the color are returned in the structure HM_RGBColorStruct, pointer to which is provided by the parameter rgb.
rgb
[out] - Pointer to HM_RGBColorStruct structure that returns values for red, green and blue components of the component color.

Errors

None.