Difference between revisions of "CAEngine::OpenModel/zh"
(Created page with "= 参数 =") |
(Created page with "= 返回值 =") |
||
Line 11: | Line 11: | ||
;FileSpec: string (the filename containing the model) | ;FileSpec: string (the filename containing the model) | ||
− | = | + | = 返回值 = |
ModelName – string (actual model name) | ModelName – string (actual model name) |
Revision as of 08:39, 16 October 2015
ADE User Guide > ADE Server Class Reference > CAEngine
OpenModel(fileSpec)
从磁盘文件读取一个模型,打开并作为当前模型。«fileSpec»按 当前模型目录进行解释。
参数
- FileSpec
- string (the filename containing the model)
返回值
ModelName – string (actual model name)
Example Usage
string modName = ade.OpenModel("C:\TMP\MYMODEL.ANA");
Remarks
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”
Comments
Enable comment auto-refresher