4 # Testing attribute: TDataStd_UAttribute
6 # Testing command: SetUAttribute
7 # Testing command: GetUAttribute
12 # Add an attribute to a data framework
13 set aSetAttr1 "c73bd075-22ee-11d2-acde-080009dc4422"
15 SetUAttribute D ${aLabel} ${aSetAttr1}
16 set aGetAttr1 [GetUAttribute D ${aLabel} ${aSetAttr1}]
18 # Add new ID to a label
19 set aSetAttr2 "c73bd076-22ee-11d2-acde-080009dc4422"
20 SetUAttribute D ${aLabel} ${aSetAttr2}
21 set aGetAttr2 [GetUAttribute D ${aLabel} ${aSetAttr2}]
23 # Close/Open the transaction
27 set aFile ${imagedir}/caf001-J6.cbf
30 if { ![file exists ${aFile}] } {
31 puts "There is not ${aFile} file; SaveAs command: Error"
34 #catch {exec chmod 777 ${aFile}}
36 # Restore the document
40 # Get a value of first ID
41 set IsDone [catch {GetUAttribute DD ${aLabel} ${aSetAttr1}} aResult]
42 if { ${IsDone} != 0 } {
44 puts "Get a value of TDataStd_UAttribute attribute from restoring document: Error"
47 if { ${aSetAttr1}!=${aGetAttr1} } {
49 puts "aSetAttr1=${aSetAttr1}"
50 puts "aGetAttr1=${aGetAttr1}"
51 puts "Get a value of TDataStd_UAttribute attribute from restoring document: Error"
55 # Get a value of second ID
56 set IsDone [catch {GetUAttribute DD ${aLabel} ${aSetAttr2}} aResult]
57 if { ${IsDone} != 0 } {
59 puts "Get a value of TDataStd_UAttribute attribute from restoring document: Error"
62 if { ${aSetAttr2}!=${aGetAttr2} } {
64 puts "aSetAttr2=${aSetAttr2}"
65 puts "aGetAttr2=${aGetAttr2}"
66 puts "Get a value of TDataStd_UAttribute attribute from restoring document: Error"
70 puts "Get a value of TDataStd_UAttribute attribute from restoring document: OK"