- Timestamp:
- Dec 4, 2009 5:13:03 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/export_drawxtl.tcl
- Property rcs:date changed from 2005/03/24 21:40:23 to 2005/09/07 21:26:38
- Property rcs:lines changed from +120 -3 to +32 -21
- Property rcs:rev changed from 1.2 to 1.3
r836 r846 22 22 # force the window to stay on top 23 23 putontop .export 24 # trigger a quit on window delete 25 wm protocol .export WM_DELETE_WINDOW {set expgui(export_phase) 0; destroy .export } 24 26 set bx .export.special 25 27 global DXTL … … 41 43 incr row 42 44 set DXTL(arrowbox) $bx.4 43 grid [checkbutton $bx.4 -text " Generatearrows for magnetic atoms" \45 grid [checkbutton $bx.4 -text "Display arrows for magnetic atoms" \ 44 46 -variable DXTL(genarrows) -state disabled] \ 45 47 -row $row -column 1 -columnspan 5 -sticky w … … 47 49 set colorlist "White Red Green Blue Yellow Cyan Magenta Black Orange Brown Grey Silver White" 48 50 set DXTL(arrowcolorbox) $bx.4a 49 grid [frame $bx.4a] -sticky ew -row $row -column 1 -columnspan 5 50 grid [label $bx.4a.h -text "Representation: "] -column 0 -row 1 51 grid [label $bx.4a.bll -text "gen from Block operator "] -column 1 -row 1 51 set DXTL(arrowcolorbox_row) $row 52 grid [frame $bx.4a] -sticky ew -row $DXTL(arrowcolorbox_row) \ 53 -column 1 -columnspan 5 54 grid [label $bx.4a.h -text "Arrow colors: "] -column 0 -row 1 -sticky w 55 grid [label $bx.4a.bll -text " generated by Black operator "] -column 0 -row 2 52 56 eval tk_optionMenu $bx.4a.bl DXTL(blackarrow) $colorlist 53 grid $bx.4a.bl -column 2 -row 154 grid [label $bx.4a.redl -text " gen from Red operator "] -column 1 -row 257 grid $bx.4a.bl -column 2 -row 2 58 grid [label $bx.4a.redl -text " generated by Red operator "] -column 0 -row 3 55 59 eval tk_optionMenu $bx.4a.red DXTL(redarrow) $colorlist 56 grid $bx.4a.red -column 2 -row 2 57 incr row 58 foreach appname {DRAWxtl41 DRAWxtl41_aqua DRAWxtl50 DRAWxtl51} { 60 grid $bx.4a.red -column 2 -row 3 61 incr row 62 # is DRAWxtl installed? 63 set app {} 64 if {![catch {set fp [open [file join $::env(HOME) .drawxtlrc] r]}]} { 65 # line 12 is name of executable 66 set i 0 67 while {$i < 12} { 68 incr i 69 gets $fp appname 70 } 71 close $fp 59 72 set app [auto_execok $appname] 60 if {$app != ""} {break}61 foreach loc [list $expgui(scriptdir) \62 ~/Applications/DRAWxtlxx1/DRAWxtl501/] {63 if {[file exists [file join $loc $appname]]} {64 set app [file join $loc $appname]65 break66 }67 }68 if {$app != ""} {break}69 73 } 70 74 if {$app != ""} { 71 75 set show normal 72 set DXTL(app) $app 76 set DXTL(app) $appname 73 77 set DXTL(launch) 1 74 78 } else { … … 97 101 } 98 102 # atom type box 99 grid [frame $bx.s -relief groove -bd 4] -row $row -column 0 -columnspan 5 -sticky ew103 grid [frame $bx.s -relief groove -bd 4] -row $row -column 0 -columnspan 5 -sticky nsew 100 104 grid [label $bx.s.0 -text "Atom representation" \ 101 105 -anchor w] -row 0 -column 0 -sticky w … … 261 265 set DXTL(genarrows) 1 262 266 $DXTL(arrowbox) configure -state normal 263 grid $DXTL(arrowcolorbox) 267 grid $DXTL(arrowcolorbox) -sticky ew -row $DXTL(arrowcolorbox_row) \ 268 -column 1 -columnspan 5 264 269 } 265 270 catch {unset typelist} … … 299 304 [winfo parent $DXTL(Blst)] config -scrollregion $sizes \ 300 305 -width [lindex $sizes 2] 306 wm geom [winfo toplevel $DXTL(Blst)] {} 301 307 } 302 308 … … 367 373 set fp [open geom.out r] 368 374 while {[gets $fp line] >= 0} { 375 if {[string match "*Geometry*,L,N,*" $line]} { 376 MyMessageBox -parent . -title "Old GSAS" \ 377 -message "Old GEOMETRY program: You are using an old version of GSAS that cannot export magnetic vectors. Upgrade GSAS to generate arrows." -icon warning 378 break 379 } 369 380 if {[string match "*name*elem*x *y *z*x *y *z*" $line]} {break} 370 381 }
Note: See TracChangeset
for help on using the changeset viewer.