Tech Articles

Error: Function GSI_GetModelName cannot be found


Tech Articles ID    KB8024686
Status:    Published
Published date:    02/18/2021
Updated:    02/18/2021
Reported In:   Adams - Adams Controls
Created with Version:   Adams (2020 FP1)
 

Abstract (Question)

I am getting this error when I try to load a Matlab generated dll into Adams:

ERROR:   Error detected on line number ###, character ### of the macro '.controls.create_gse_dll'.
ERROR:    The External System Library cannot be loaded because: Function GSI_GetModelName cannot be found in
<path\filename.dll>
ERROR:   The command was not executed.

What's wrong and how do I fix it?

Description (Answer)

Cause:
This error frequently happens if you forget to issue the following command in Matlab in the steps leading up to dll export:
setup_rtw_for_adams
This command will copy several needed files from the Adams installation directory to the model directory. This includes a file that contains the missing function.

Solution:
Re-export the dll, making sure to follow this step.