607a96d4 |
1 | set aTestName "caf100-P1" |
2 | puts ${aTestName} |
3 | |
4 | # Set a coordinates |
5 | set X 123.456 |
6 | set Y 789.012 |
7 | set Z 345.678 |
8 | |
9 | # Set a position attribute |
10 | set aCLabel 0:1:1 |
11 | Label D ${aCLabel} |
12 | SetPosition D ${aCLabel} ${X} ${Y} ${Z} |
13 | |
14 | # Save the document |
15 | set aFile ${WorkDirectory}/${aTestName}.${FileSuffix} |
16 | |
17 | SaveToFile D $aFile |
18 | |
19 | # Restore the document |
20 | Close D |
21 | Open ${aFile} DD |
22 | |
23 | # Get a variable from the label |
24 | set IsDone [catch {GetPosition DD ${aCLabel} X2 Y2 Z2} aResult] |
25 | if { ${IsDone} != 0 } { |
26 | puts "Error : Get a value of TPrsStd_Position attribute from restoring document" |
27 | } else { |
28 | |
29 | if { ${X2} != ${X} || ${Y2} != ${Y} || ${Z2} != ${Z}} { |
30 | puts "Error : Get a value of TPrsStd_Position attribute from restoring document" |
31 | } |
32 | } |