Skip to content
gizmon edited this page Jun 9, 2023 · 11 revisions

Welcome to the gz_msgbox wiki!

AutoCAD や AutoLISP と DCL が利用可能な互換 CAD (AresCAD, BricsCAD, GstarCAD, IJCAD, IntelliCAD系)で使える各種のメッセージボックス関数たちです。 AutoLISP からダイアログ表示するには DCL ファイルを呼び出しするが常道ですが、処理の仕方や DCL の記述の仕方が初心者にはわかりにくいのでそのあたりを補助します。 まぁあれです。VBAっぽく使える、メッセージ表示ないん?っていう人向けの関数。

なお、gz:lspbrowsefolder と GZ:popup は VL関数が使えない CAD では使えません。


discription Various message box functions for AutoCAD and compatible CAD (AresCAD, BricsCAD, GstarCAD, IJCAD, IntelliCAD, etc.) where AutoLISP and DCL are available. The usual way to display dialogs from AutoLISP is to call a DCL file, but it is difficult for beginners to understand how to process and write DCL, so this section helps with that. Well, you know, it can be used like VBA, but without the message display? This is a function for people who want to use it like VBA.

Note that gz:lspbrowsefolder and gz:popup cannot be used in CAD where VL functions are not available.



ダイアログの種類 --- 対応する関数

  • [OK]-[Cancel] --- gz:lspOkCancel
  • [Yes]-[No] --- gz:lspYesNo
  • [OK] --- gz:lspOkOnly
  • [Yes]-[No]-[Cancel] --- gz:lspYesNoCancel
  • [OK]-[Cancel] --- gz:lspRetryCancel
  • 戻り値 OK=T、キャンセル=nil、No="F"

ダイアログの種類 --- 対応する関数

  • [パスワード入力] --- gz:lspGetPass
  • [Inputbox] --- gz:lspInputBox (ボタンが横にあるタイプ)
  • [Inputbox] --- gz:lspInputBox2 (ボタンが下にあるタイプ)
  • [Inputbox] --- gz:lspInputBox3 (ボタンが下にあるタイプでチェックボックス付き)
  • [Combobox] --- gz:lspComboBox
  • [Listbox] --- gz:lspListBox
  • [Listbox] --- gz:lspListBoxMlti (複数選択可)
  • 戻り値 OK=文字列、キャンセル=nil

ダイアログの種類 --- 対応する関数

  • [フォルダ選択] --- gz:lspbrowsefolder
  • 戻り値 フォルダ名の文字列

ダイアログの種類 --- 対応する関数

  • [popup] WSH の popup メソッドを使ったMSGボックス --- gz:popup
  • 戻り値 OK=1,キャンセル=2, 中止=3, 再試行=4, 無視=5, はい=6, いいえ=7, 再実行=10, 続行=11

各関数の表示サンプル

細かいところは 別 Wiki もどうぞ。 https://wiki.gz-labs.net/index.php/%E3%83%80%E3%82%A4%E3%82%A2%E3%83%AD%E3%82%B0%E3%82%A6%E3%82%A3%E3%83%B3%E3%83%89%E3%82%A6(GZ-LIB)

Clone this wiki locally