1 puts "# =============================================================================="
2 puts "# 0031382: Data Exchange - BinXCAF should preserve length unit information"
3 puts "# =============================================================================="
11 # check saving value of length unit
15 XSave D ${imagedir}/${casename}.xml
16 XOpen ${imagedir}//${casename}.xml D1
17 set LU [XGetLengthUnit D1]
19 puts "Error: Length unit is not coincided with given1"
26 XSave D ${imagedir}/${casename}.xbf
27 XOpen ${imagedir}//${casename}.xbf D1
28 set LU [XGetLengthUnit D1]
30 puts "Error: Length unit is not coincided with given2"
35 # if length unit is undefined in the document value from session
36 # must be set to document before saving it to xml
38 param xstep.cascade.unit 5
40 XSave D ${imagedir}/${casename}.xml
41 set LU [XGetLengthUnit D]
43 puts "Error: Length unit is not coincided with given3"
45 XOpen ${imagedir}//${casename}.xml D1
46 set LU [XGetLengthUnit D1]
47 if {$LU == "stat.mile"} {
48 puts "Length unit is coincided with given"
50 puts "Error: Length unit is not coincided with given4"
55 # if length unit is undefined in the document value from session
56 # must be set to document before saving it to xbf
58 param xstep.cascade.unit 7
60 XSave D ${imagedir}/${casename}.xbf
61 set LU [XGetLengthUnit D]
63 puts "Length unit is coincided with given"
65 puts "Error: Length unit is not coincided with given"
67 XOpen ${imagedir}//${casename}.xbf D1
68 set LU [XGetLengthUnit D1]
70 puts "Length unit is coincided with given"
72 puts "Error: Length unit is not coincided with given"
75 # return to default global unit
76 param xstep.cascade.unit 2
77 file delete ${imagedir}//${casename}.xbf
78 file delete ${imagedir}//${casename}.xml