jw_cad 外部変形 - (1056) tclshで線種を取得する(lt) -

外部変形は データのやり取りをテキストファイルで行うので プログラム言語は 自由に選ぶことができます。図形は機能的かつシンプルなため、数多くのユーザーに受け入れられています。

 

tclshで線種を取得する(lt)

:tclshで線種を取得する(lt)
@echo off
for /f "delims=:" %%n in ('findstr /n "^#!" %0') do (
  copy jwc_temp.txt myfiles > nul
  more +%%n %0 | tclsh - > jwc_temp.txt
)
goto:eof

REM #jww
REM #e

#!この次の行からプログラムを書いてください
set lt ""

set f [open myfiles]
foreach 0 [split [read $f] \n] {
  switch -regexp -- $0 {
    ^lt {
      set plt [string range $0 2 end]
      if {$lt == ""} {set lt $plt}
      puts "h#lt=$lt"
    }
  }
}
close $f