40093367 |
1 | #INTERFACE CAF |
2 | # Tree construction attributes |
3 | # |
4 | # Testing attribute: TDataStd_Directory |
5 | # |
6 | # Testing command: NewDirectory |
7 | # |
8 | |
9 | puts "caf005-B3" |
10 | |
11 | # Add an attribute to a data framework |
12 | set aLabel1 0:2 |
13 | NewDirectory D ${aLabel1} |
14 | set aName1 Label1 |
15 | SetName D ${aLabel1} ${aName1} |
16 | |
17 | # Close/Open the transaction |
18 | NewCommand D |
19 | |
20 | # Save the document |
e837410d |
21 | set aFile ${imagedir}/caf001-B3.cbf |
40093367 |
22 | file delete ${aFile} |
23 | SaveAs D ${aFile} |
24 | if { ![file exists ${aFile}] } { |
25 | puts "There is not ${aFile} file; SaveAs command: Error" |
26 | return |
27 | } |
28 | #catch {exec chmod 777 ${aFile}} |
29 | |
30 | # Restore the document |
31 | Close D |
32 | Open ${aFile} DD |
33 | |
34 | # Get a value of the attribute |
35 | set IsDone [catch {set aGetName1 [GetName DD ${aLabel1}]} aResult] |
36 | if { ${IsDone} != 0 || |
37 | ${aName1}!=${aGetName1} } { |
38 | puts "aName1=${aName1} aGetName1=${aGetName1}" |
39 | puts ${aResult} |
40 | puts "Get a value of TDataStd_Directory attribute from restoring document: Error" |
41 | return |
42 | } |
43 | puts "Get a value of TDataStd_Directory attribute from restoring document: OK" |