Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
f2929057eThis file is pinned to the selected release. Download the original to open it in your design tool.
# Original bug : 23384
# Date : 16 Aug 2012
pload OCAF
XOpen [locate_data_file bug23384-doc_subshapes_plain.xbf] doc
set info1 [XStat doc]
regexp {level N 0 +: +([-0-9.+eE]+)} $info1 full l0
regexp {level N 1 +: +([-0-9.+eE]+)} $info1 full l1
regexp {Total number of labels for shapes in the document += +([-0-9.+eE]+)} $info1 full nb
regexp {Number of labels with name += +([-0-9.+eE]+)} $info1 full nbname
set aTmpFile ${imagedir}/${casename}_temp.stp
param write.stepcaf.subshapes.name 1
WriteStep doc $aTmpFile
param read.stepcaf.subshapes.name 1
ReadStep after_doc $aTmpFile
file delete -force $aTmpFile
set info2 [XStat after_doc]
regexp {level N 0 +: +([-0-9.+eE]+)} $info2 full l0_1
regexp {level N 1 +: +([-0-9.+eE]+)} $info2 full l1_1
regexp {Total number of labels for shapes in the document += +([-0-9.+eE]+)} $info2 full nb_1
regexp {Number of labels with name += +([-0-9.+eE]+)} $info2 full nbname_1
if { ${l0} != ${l0_1} ||
${l0} != "4" ||
${l1} != ${l1_1} ||
${l1} != "131" ||
${nb} != ${nb_1} ||
${nb} != "135" ||
${nbname} != ${nbname_1} ||
${nbname} != "135"} {
puts "Error : Document is read/written wrong!"
}
Close doc
Close after_doc