HM_ExtAPI::CreateComponent()
Creates new component in HyperMeshdatabase.
Syntax
bool CreateComponent(
HM_EntityComponent& new_comp,
const char* name,
HM_Color color
const HM_RGBColorStruct* rgb,
bool make_current
)
Type
HyperMesh Ext API
Description
The parameter rgb is ignored if the value of the parameter color is notHM_COLOR_USE_RGB.
If the value of the parameter color if HM_COLOR_USE_RGB and the value of the parameter rgb is NULL the the value of HM_COLOR_DEFAULT is used instead.
All new geometry in HyperMesh is created in current component unless otherwise specified by the parameter in geometry creation functions.
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
- new_comp
- [out] - Handle to new component object.
- 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.
- color
- [in] - Numerical constant that specifies the color of the new component. The parameter can have one of following values.
- rgb
- [in] - Pointer to HM_RGBColorStruct structure that contains values for red, green and blue components in the color of new component. The parameter is ignored if the value of the color parameter is not equal to HM_COLOR_USE_RGB.
- make_current
- [in] - Pointer to HM_RGBColorStruct structure that contains values for red, green and blue components in the color of new component. The parameter is ignored if the value of the color parameter is not equal toHM_COLOR_USE_RGB.
Errors
None.