jw_cad 外部変形 - (1054) tclshでレイヤを取得する(ly) -

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

 

tclshでレイヤを取得する(ly)

:tclshでレイヤを取得する(ly)
@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 ly ""

set f [open myfiles]
foreach 0 [split [read $f] \n] {
  switch -regexp -- $0 {
    ^ly[0-9a-f] {
      set ply [string index $0 2]
      if {$ly == ""} {set ly $ply}
      puts "h#ly=$ly"
    }
  }
}
close $f