Header Files
hm_extapi.h
This header file contains the declaration of the virtual interface to the object representing an instance of HyperMesh. All of the exposed functionality of the HyperMesh instance is available via this virtual interface. This file is located under the <altair_home>/hm/include directory.
Additionally, the header file contains declarations of global functions. One such function is Open_HM_ExtAPI() which creates an instance of HyperMesh and returns a pointer to the interface object. Another function is Close_HM_ExtAPI() which closes the instance of HyperMesh. These initialization and termination functions are defined in the hm_extapi.lib file, which needs to be linked to the user application.
In order to access the exposedHyperMesh functionality, the user application first must call the function Open_HM_ExtAPI(). The function finds an existing HyperWorks installation, loads the required libraries, verifies that the current version of the library used by the application matches that of the existing HyperWorks installation, and returns a pointer to the interface object. This pointer then can be used within the user application to access the exposed HyperMesh functionality.
When the user application terminates or does not need access to HyperMesh functions anymore, it must call the function Close_HM_ExtAPI() to terminate the session.
hm_extapi_error.h
This additional header file contains error code values that can be used by external applications for processing error conditions. This file is located under the <altair_home>/hm/include directory.
Most API functions return a Boolean value of true in case of their successful execution and false in case some error condition was encountered during the call. The API function HM_ExtAPI::GetLastErrorCode() can be used to obtain error specific numeric code values, which can then be used appropriately.
#include "hm_extapi.h"
#include "hm_extapi_error.h"