607a96d4 |
1 | set aTestName "xcaf200-L1" |
2 | puts $aTestName |
3 | |
4 | # Add an attribute to a data framework |
5 | set aLabel [XNewShape D] |
6 | box aB 10 20 30 |
7 | ttranslate aB 333 777 13 |
8 | XAddComponent D $aLabel aB |
9 | set aLabel ${aLabel}:1 |
10 | |
11 | # Close/Open the transaction |
12 | NewCommand D |
13 | |
14 | # save result for check after retrieval |
15 | set location_before [XDumpLocation D $aLabel] |
16 | |
17 | # Save the document |
18 | set aFile $WorkDirectory/${aTestName}.${FileSuffix} |
19 | |
20 | SaveToFile D $aFile |
21 | |
22 | # Restore the document |
23 | Close D |
24 | Open ${aFile} DD |
25 | |
26 | # Get a value of the attribute |
27 | set IsDone [catch {set location_after [XDumpLocation DD $aLabel]} aResult] |
28 | if { ${IsDone} != 0 || ${location_after} != ${location_before} } { |
29 | puts "Error : Get a value of XCAFDoc_Location attribute from restoring document" |
30 | } |