ADE User Guide > ADE Server Class Reference > CAEngine
Reads a model from a disk file and opens it as the current model. The «fileSpec» is interpreted relative to the CurrentModelDirectory.
- string (the filename containing the model)
ModelName – string (actual model name)
string modName = ade.OpenModel("C:\TMP\MYMODEL.ANA");
Failure should be detected by checking whether the return value is "", not by checking for a zero ErrorCode. It is possible that some errors or warnings might occur during loading, and is thus reflected in the ErrorCode, ErrorText, and OutputBuffer properties, even though the load was successful.
- 2 – Warning (but load was successfully completed)
- 3 – Lexical error (load was only partially successful)
- 4 – Statement error (load was only partially successful)
- 39 – “Model could not be found”
Enable comment auto-refresher