HM_ExtAPI::ImportModel()

Loads model from CAD file into HyperMesh database.

Syntax

bool ImportModel(
HM_ExtAPI::ImportModelType typ,
const char*  model_file_path,
bool replace_old,
const HM_ImportModelParamStruct* params = NULL
);

Type

HyperMesh Ext API

Description

The function calls CAD import translators included in HyperWorks installation. To control output of logging files that translators produce during their work call HM_ExtAPI::SetScratchFolder().

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

typ
[in] - Specifies CAD file format. This parameter can have one of following values.
HM_ExtAPI::IGES - IGES model
HM_ExtAPI::CATIA - CATIA model
HM_ExtAPI::UG - UG model HM_ExtAPI::STEP - STEP model
HM_ExtAPI::PROE - ProE model
HM_ExtAPI::PARASOLID - Parasolid model
HM_ExtAPI::ACIS - ACIS model
HM_ExtAPI::VDAFS - VDAFS model
HM_ExtAPI::JT - JT model
HM_ExtAPI::AUTO - HyperMesh automatically detects the model type.
model_file_path
[in] - Model file name.
replace_old
[in] - Specifies whether to keep model already loaded into HyperMesh database. The parameter can have one of following values.
true - Delete old model.
false - Keep old model.
params
[in] - Optional pointer to HM_ImportModelParamStruct structure containing import parameters. If pointer is set to NULL then default values of import parameters are used. See HM_ImportModelParamStruct for details.

Errors

None.