3 #Sometimes this error is inside a log file, but it is outside in other case. The '?' character manage it.
5 puts "================"
7 puts "================"
10 # Presentation attributes
12 # Testing attribute: TPrsStd_AISPresentation
14 # Testing command: AISSet
17 # ANALOG: puts "caf003-A4"
19 # Create a new document and set UndoLimit
20 NewDocument Doc BinOcaf
26 # Set NamedShape attribute
29 SetShape Doc ${aLabel} aBox1
31 # Initialize 3D viewer
34 # Add AISPresentation attribute with parameter NS
35 AISSet Doc ${aLabel} NS
37 # Display presentation of NamedShape in the viewer
38 AISDisplay Doc ${aLabel}
41 set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
43 catch {SaveAs Doc ${aFile}}
44 if { ![file exists ${aFile}] } {
45 puts "There is not ${aFile} file; SaveAs command: Error"
46 puts "OCC1228: ERROR (case 1)"
48 #catch {exec chmod 777 ${aFile}}
50 # Restore the document
52 catch {Open ${aFile} DDoc}
54 # Initialize 3D viewer
55 catch {AISInitViewer DDoc}
57 ########## Add AISPresentation attribute with parameter NS
58 ##########AISSet DDoc ${aLabel} NS
60 # Display presentation of NamedShape in the viewer
61 set IsDone [catch {AISDisplay DDoc ${aLabel}} aResult]
62 if { ${IsDone} != 0 } {
64 puts "Get a value of TPrsStd_AISPresentation attribute from restoring document: Error"
65 puts "OCC1228: ERROR (case 2)"
68 puts "There is the box in the viewer"