Difference between revisions of "CAEngine::OpenModel/zh"

(Created page with "CAEngine::OpenModel")
 
 
(12 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
= OpenModel(fileSpec) =
 
= OpenModel(fileSpec) =
  
Reads a model from a disk file and opens it as the current model.  The «fileSpec» is interpreted relative to the [[CurrentModelDirectory]].
+
从磁盘文件读取一个模型,打开并作为当前模型。«fileSpec»按[[CurrentModelDirectory | 当前模型目录]]进行解释。
  
= Parameters =
+
= 参 数 =
  
;FileSpec: string (the filename containing the model)
+
;FileSpec:string——字符串(包含模型的文件名)
  
= Return value =
+
= 返回值 =
  
ModelName – string (actual model name)
+
ModelName——字符串(实际模型名称)
  
= Example Usage =
+
= 示例用法 =
  
 
  string modName = ade.OpenModel("C:\TMP\MYMODEL.ANA");
 
  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
+
通过检查返回值是否为"",而不是通过检查值为0[[ErrorCode/zh | 错误代码]]来探测失败。有可能在载入过程中出现某些错误或者警告,因此由[[CAEngine::ErrorCode/zh | 错误代码]][[ErrorCode::ErrorText/zh | 错误文本]],以及[[CAEngine::OutputBuffer/zh | OutputBuffer]]属性来反映,即使载入成功也如此。
[[ErrorCode]]. It is possible that some errors or warnings might occur during loading, and is thus
 
reflected in the [[CAEngine::ErrorCode|ErrorCode]], [[ErrorCode::ErrorText|ErrorText]], and [[CAEngine::OutputBuffer|OutputBuffer]] properties, even though the load was successful.
 
  
= API errors =
+
= API 错误 =
  
* 2 – Warning (but load was successfully completed)
+
* 2 – 警告(但是完全成功载入)
* 3 – Lexical error (load was only partially successful)
+
* 3 – 词汇错误(部分成功载入)
* 4 – Statement error (load was only partially successful)
+
* 4 – 语句错误(部分成功载入)
* 39 – “Model could not be found”
+
* 39 – “模型未找到”

Latest revision as of 08:10, 20 October 2015

ADE User Guide > ADE Server Class Reference > CAEngine

Other languages:
English • ‎中文

OpenModel(fileSpec)

从磁盘文件读取一个模型,打开并作为当前模型。«fileSpec»按 当前模型目录进行解释。

参 数

FileSpec:string——字符串(包含模型的文件名)

返回值

ModelName——字符串(实际模型名称)

示例用法

string modName = ade.OpenModel("C:\TMP\MYMODEL.ANA");

说明

通过检查返回值是否为"",而不是通过检查值为0 错误代码来探测失败。有可能在载入过程中出现某些错误或者警告,因此由 错误代码 错误文本,以及 OutputBuffer属性来反映,即使载入成功也如此。

API 错误

  • 2 – 警告(但是完全成功载入)
  • 3 – 词汇错误(部分成功载入)
  • 4 – 语句错误(部分成功载入)
  • 39 – “模型未找到”
Comments


You are not allowed to post comments.