HM_ExtAPI::ComponentGetID()

Returns the ID of a component.

Syntax

bool ComponentGetNextElement(
const HM_EntityMesh& hmesh,
const HM_EntityMeshComponent& hcomp,
int& comp_id
);

Type

HyperMesh Ext API Function

Description

For mesh components created according to the topological components HM_Component, the returned ID is equal to the zero-based index of the corresponding topological component in the array HM_Topology::components. For auto-created mesh components (created for some cases of topology imprint errors) the returned ID is equal or larger to HM_Topology::num_components.

If the function succeeds, the return value is true. 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.
comp_id
[out] - Non-negative integer ID of the component referenced by the mesh and component objects. It is assigned to -1 when there is an error.

Errors

None.

Version History

11.0.101