4 # Testing attribute: User defined (additional GUID) TDataStd_AsciiString
6 # Testing command: SetAsciiString
7 # Testing command: GetAsciiString
12 # Add an attribute to a data framework
13 set aSetAttr1 "New Attribute_1"
14 set aSetAttr2 "New Attribute_2"
15 set aGuid2 "12e94572-6dbc-11d4-b9c8-0060b0ee281b"
17 SetAsciiString D ${aLabel} ${aSetAttr1}
18 SetAsciiString D ${aLabel} ${aSetAttr2} ${aGuid2}
20 # Close/Open the transaction
24 set aFile ${imagedir}/caf001-N7.cbf
27 if { ![file exists ${aFile}] } {
28 puts "There is not ${aFile} file; SaveAs command: Error"
31 #catch {exec chmod 777 ${aFile}}
33 # Restore the document
37 # Get a value of the attribute #1
38 set IsDone [catch {set aGetAttr3 [GetAsciiString DD ${aLabel}]} aResult]
39 if { ${IsDone} != 0 ||
40 ${aSetAttr1}!=${aGetAttr3} } {
42 puts "aSetAttr1=${aSetAttr1} aGetAttr3=${aGetAttr3}"
43 puts "Get a value of the first TDataStd_AsciiString attribute from restoring document: Error"
47 # Get a value of the attribute #2
48 set IsDone [catch {set aGetAttr4 [GetAsciiString DD ${aLabel} ${aGuid2}]} aResult]
49 if { ${IsDone} != 0 ||
50 ${aSetAttr2}!=${aGetAttr4} } {
52 puts "aSetAttr2=${aSetAttr2} aGetAttr4=${aGetAttr4}"
53 puts "Get a value of the second TDataStd_AsciiString attribute from restoring document: Error"
57 puts "Get a value of user defined TDataStd_AsciiString attributes from restoring document: OK"