HM_ExtAPI::ComponentGetFirstElement()

Returns the first element in a mesh component.

Syntax

bool ComponentGetFirstElement(
const HM_EntityMesh& hmesh,
const HM_EntityMeshComponent& hcomp,
HM_EntityElement& helem
);

Type

HyperMesh Ext API Function

Description

This is used together with the function HM_ExtAPI::ComponentGetNextElement() to iterate through all the elements contained in the component referenced by the mesh and component objects. A call to the HM_ExtAPI::ComponentGetFirstElement() function resets the internal element counter of the mesh object to the first element. Subsequent calls to HM_ExtAPI::ComponentGetNextElement() increment the counter until all elements of the component are iterated.

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

Requires including hm_extapi.h.

Inputs

hmesh
[in] - Handle to mesh object that was returned by previous calls to API funcitons.
hcomp
[in] - Handle to mesh component object that was returned by previous calls to API functions for the mesh object referenced by hmesh.
helem
[out] - Handle to the first element in the mesh component referenced by the mesh and component objects. The value of the handle is zero in case the component does not have any elements.

Errors

None.

Version History

11.0.101