4 # Testing attribute: TDataStd_Point
6 # Testing command: SetPoint
7 # Testing command: GetPoint
14 # Add an attribute to a data framework
18 point aPoint1 ${aSetX1} ${aSetY1} ${aSetZ1}
20 set aDumpPoint1 [dump aPoint1]
22 # [llength ${aDumpPoint1}] = 10
23 # Format of ${aDumpPoint1}:
24 # *********** Dump of aPoint1 *************
25 # Point : 1.000000000000000e+01, 2.000000000000000e+01, 3.000000000000000e+01
27 set X_Point1 [lindex [split [lindex ${aDumpPoint1} 7] ${aTokList}] 0]
28 set Y_Point1 [lindex [split [lindex ${aDumpPoint1} 8] ${aTokList}] 0]
29 set Z_Point1 [lindex [split [lindex ${aDumpPoint1} 9] ${aTokList}] 0]
32 SetPoint D ${aLabel} aPoint1
34 # Close/Open the transaction
37 # Set a new value of the attribute
41 point aPoint3 ${aSetX3} ${aSetY3} ${aSetZ3}
42 SetPoint D ${aLabel} aPoint3
44 # Close/Open the transaction
50 # Get a value of the attribute
51 GetPoint D ${aLabel} aPoint4
53 set aDumpPoint4 [dump aPoint4]
54 set X_Point4 [lindex [split [lindex ${aDumpPoint4} 7] ${aTokList}] 0]
55 set Y_Point4 [lindex [split [lindex ${aDumpPoint4} 8] ${aTokList}] 0]
56 set Z_Point4 [lindex [split [lindex ${aDumpPoint4} 9] ${aTokList}] 0]
58 if { ${X_Point1} != ${X_Point4} ||
59 ${Y_Point1} != ${Y_Point4} ||
60 ${Z_Point1} != ${Z_Point4} } {
61 puts "X_Point1=${X_Point1} X_Point4=${X_Point4}"
62 puts "Y_Point1=${Y_Point1} Y_Point4=${Y_Point4}"
63 puts "Z_Point1=${Z_Point1} Z_Point4=${Z_Point4}"
64 puts "Set a value of TDataStd_Point attribute: Error"
67 puts "Set a value of TDataStd_Point attribute: OK"