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