「Ai ffile」の版間の差分
(ページの作成:「{{AutoLISP}} ; 構文 : (ai_ffile ''filename'') ; 機能 : プログラムのファイル(.lsp, .exp, .exe, .arx)があるかどうかチェックする。 ; 引...」) |
編集の要約なし |
||
| 39行目: | 39行目: | ||
----- | ----- | ||
関連事項 | 関連事項 | ||
* [[]] | * [[Ai_関数]] | ||
[[Category:AutoLISP]] | [[Category:AutoLISP]] | ||
2022年5月8日 (日) 11:52時点における最新版
- 構文
- (ai_ffile filename)
- 機能
- プログラムのファイル(.lsp, .exp, .exe, .arx)があるかどうかチェックする。
- 引数
-
- filename … 検索するファイル名
- 戻り値
- あれば、ファイルの T、無ければ nil
- サンプル
; 関数定義としては、次の通り
(defun ai_ffile (app)
(or (findfile (strcat app ".lsp"))
(findfile (strcat app ".exp"))
(findfile (strcat app ".exe"))
(findfile (strcat app ".arx"))
(findfile app))
)
; 拡張子なしの場合は、.lsp, .exp, .exe, .arx または拡張子なしファイルを検索
(ai_ffile "acad")
T
; 拡張子ありの場合は、そのままの名前ものを検索
(ai_ffile "acad.fas")
nil
関連事項