HM_ExtAPI::CADDocumentGetComponent()

Returns the component created for the model assembly hierarchy document.

Syntax

bool CADDocumentGetComponent(
const HM_CAD_Document & doc,
int comp_ind,
HM_EntityComponent & comp
);

Type

HyperMesh Ext API

Description

The function CADDocumentGetComponent is used together with the function HM_ExtAPI::CADDocumentGetComponentsCount() to access geometry imported from the CAD model file.

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().

The documents of the type HM_ExtAPI::DOC_ASSEMBLY() may not have associated components in HyperMesh database.

More than one component may be created in HyperMesh database for single document. This mainly is defined by import translator options set by the user in translator initialization file (for example “catia.ini”) used by specific HyperMesh installation. See HyperMesh documentation for more details.

Components in the HyperMesh database may not have model assembly documents associated with them. This normally happens in case if the model was not imported from the CAD model file but created internally byHyperMesh commands. For the full access to the components in the database use API functions HM_ExtAPI::GetFirstComponent() and HM_ExtAPI::GetNextComponent().

Requires including hm_extapi.h.

Inputs

doc
[in] - Handle to document object that was returned by previous calls to API functions.
comp_ind
[in] - Document component zero-based index. The value must be in the range from 0 to comps_count where comps_count is the number of components associated with doc as returned by the functionHM_ExtAPI::CADDocumentGetComponentsCount().
comp
[out] - Component handle.

Errors

None.