# Script to import multiple database files # No error checks! package require PWI_Glyph 2.18.0 # Create list of files to read list fileNames lappend fileNames "C:tmp/file1.igs" # lappend fileNames "C:tmp/file2.igs" # lappend fileNames "C:tmp/file3.igs" # add as many files as needed puts [format "Number of files to import %s" $numFiles] for { set iCurrentFile 0 } { $iCurrentFile < $numFiles } {incr iCurrentFile} { pw::Display setCurrentLayer [expr 1 + $iCurrentFile] set thisMode [pw::Application begin DatabaseImport] puts [format "Importing file # %s of %s: %s" [expr 1 + $iCurrentFile] $numFiles [lindex $fileNames $iCurrentFile]] $thisMode initialize -strict -type Automatic [lindex $fileNames $iCurrentFile] $thisMode read $thisMode convert $thisMode end } unset thisMode