40 lines
951 B
Plaintext
40 lines
951 B
Plaintext
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<hdevelop file_version="1.1" halcon_version="12.0">
|
||
|
<procedure name="LoadModel">
|
||
|
<interface>
|
||
|
<ic>
|
||
|
<par name="INPUT_Model" base_type="ctrl" dimension="0"/>
|
||
|
</ic>
|
||
|
<oc>
|
||
|
<par name="OUTPUT_ModelID" base_type="ctrl" dimension="0"/>
|
||
|
<par name="OUTPUT_Flag" base_type="ctrl" dimension="0"/>
|
||
|
</oc>
|
||
|
</interface>
|
||
|
<body>
|
||
|
<l>try</l>
|
||
|
<l> OUTPUT_Flag:=0</l>
|
||
|
<l>* OUTPUT_ModelID:=''</l>
|
||
|
<l> tuple_length (INPUT_Model, lenght)</l>
|
||
|
<l> switch(lenght)</l>
|
||
|
<l> case 1:</l>
|
||
|
<l> read_ncc_model (INPUT_Model, OUTPUT_ModelID)</l>
|
||
|
<l>* OUTPUT_ModelID :=ModelID</l>
|
||
|
<l> break</l>
|
||
|
<l> endswitch</l>
|
||
|
<l> OUTPUT_Flag:=1</l>
|
||
|
<l>catch (Exception)</l>
|
||
|
<l> OUTPUT_Flag:=0</l>
|
||
|
<l>endtry</l>
|
||
|
<c></c>
|
||
|
<l>return ()</l>
|
||
|
</body>
|
||
|
<docu id="LoadModel">
|
||
|
<parameters>
|
||
|
<parameter id="INPUT_Model"/>
|
||
|
<parameter id="OUTPUT_Flag"/>
|
||
|
<parameter id="OUTPUT_ModelID"/>
|
||
|
</parameters>
|
||
|
</docu>
|
||
|
</procedure>
|
||
|
</hdevelop>
|