ADE User Guide > ADE Server Class Reference > CAEngine

Other languages:
English • ‎中文


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)

Return value

ModelName – string (actual model name)

Example Usage

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.

API errors

  • 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”

You are not allowed to post comments.