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 # Forget the attribute
40 # Close/Open the transaction
48 # Get a value of the attribute
49 GetPoint D ${aLabel} aPoint2
51 set aDumpPoint2 [dump aPoint2]
52 set X_Point2 [lindex [split [lindex ${aDumpPoint2} 7] ${aTokList}] 0]
53 set Y_Point2 [lindex [split [lindex ${aDumpPoint2} 8] ${aTokList}] 0]
54 set Z_Point2 [lindex [split [lindex ${aDumpPoint2} 9] ${aTokList}] 0]
56 if { ${X_Point1} != ${X_Point2} ||
57 ${Y_Point1} != ${Y_Point2} ||
58 ${Z_Point1} != ${Z_Point2} } {
59 puts "X_Point1=${X_Point1} X_Point2=${X_Point2}"
60 puts "Y_Point1=${Y_Point1} Y_Point2=${Y_Point2}"
61 puts "Z_Point1=${Z_Point1} Z_Point2=${Z_Point2}"
62 puts "Add Point attribute: Error"
65 puts "Add Point attribute: OK"