度々すみません。
使用CAD:AutoCAD2025
フランジとエルボのブロックをファイル名指定して挿入するlispを作っております。(このあとチーズ、ニップルなど多岐にわたって同じように作っていきたい)
フランジはうまく動くのですがエルボが引数fitの関数が間違っていますと言われているようです。
今まで色々改造しながら作ってうまくいっていたのですが、今日突然エラーメッセージがでてしまいました。
FILEという型が想定されているらしいのですが、よく意味がわかりません。
ご教授いただけないでしょうか?
;■ロングorショートorHT
(defun get_my_Elbow_LongShort_HT()
(initget 1 "No Short Ht SHt")
(setq whichFitting (getkword "[No / Short / Ht / SHt ショートHT]"))
(cond ((= whichFitting "No")(setq LS "" HT ""))
((= whichFitting "Short")(setq LS "ショート" HT ""))
((= whichFitting "Ht")(setq LS "" HT "HT"))
((= whichFitting "SHt")(setq LS "ショート" HT "HT"))
(t)
);cond
(princ)
);defun
;(get_my_Elbow_LongShort_HT)
;■視点
(defun get_my_ViewPoint()
(initget 1 "El Side Front IL Top Bottom Cut Oku No")
(setq whichFitting (getkword "[El エルボ付き / Side 側面 / Front 正面 / IL I&L / Top 平面 / Bottom 下面 / Cut 断面 / Oku 奥側 / No 視点なし]"))
(cond ((= whichFitting "El")(get_my_Elbow_LongShort_HT)(setq vpoint (strcat "-" HT "エルボ付き" LS)))
((= whichFitting "Side")(get_my_Elbow_LongShort_HT)(setq vpoint (strcat "-" HT "側面" LS)))
((= whichFitting "Front")(get_my_Elbow_LongShort_HT)(setq vpoint (strcat "-" HT "正面" LS)))
((= whichFitting "IL")(get_my_Elbow_LongShort_HT)(setq vpoint (strcat "-" HT "I&L" LS)))
((= whichFitting "Top")(get_my_Elbow_LongShort_HT)(setq vpoint (strcat "-" HT "平面" LS)))
((= whichFitting "Bottom")(get_my_Elbow_LongShort_HT)(setq vpoint (strcat "-" HT "下面" LS)))
((= whichFitting "Cut")(get_my_Elbow_LongShort_HT)(setq vpoint (strcat "-" HT "断面" LS)))
((= whichFitting "Oku")(get_my_Elbow_LongShort_HT)(setq vpoint (strcat "-" HT "奥側" LS)))
((= whichFitting "No")(get_my_Elbow_LongShort_HT)(setq vpoint ""))
(t)
);cond
(princ)
);defun
;(get_my_ViewPoint)
;■フランジ種類
(defun get_my_Flange()
(initget 1 "Welded Screwed Ts Blind Lapjyoint")
(setq whichFitting (getkword "[Welded / Screwed / Ts / Blind / Lapjyoint]"))
(cond ((= whichFitting "Welded")(setq kf (getstring "[(10KF)/(5KF)]"))(setq fit (strcat "溶接フランジ " kf " "))(get_my_ViewPoint))
((= whichFitting "Screwed")(setq kf (getstring "[(10KF)/(5KF)]"))(setq fit (strcat "ねじ込みフランジ " kf " "))(get_my_ViewPoint))
((= whichFitting "Ts")(setq kf (getstring "[(10KF)/(5KF)]"))(setq fit (strcat "塩ビフランジ " kf " "))(get_my_ViewPoint))
((= whichFitting "Blind")(setq kf (getstring "[(10KF)/(5KF)]"))(setq fit (strcat "BLIND " kf " ")vpoint "-正面"))
((= whichFitting "Lapjyoint")(setq kf (getstring "[(10KF)/(5KF)]"))(setq fit (strcat "LAPJYOINT " kf " ") vpoint ""))
(t)
);cond
(princ)
);defun
;(get_my_Flange_name)
;■エルボ種類
(defun get_my_Elbow()
(initget 1 "Els 45 Street Kei Water")
(setq whichFitting (getkword "[Els / 45 / Street / Kei 径違いエルボ / Water 給水栓エルボ]"))
(cond ((= whichFitting "Els")(setq wst (getstring "[(W)/(S)/(T)]"))(if (= wst "W")(setq wst "溶接"))(if (= wst "S")(setq wst "ねじ込み"))(if (= wst "T")(setq wst "塩ビ"))(setq fit (strcat wst "エルボ "))(get_my_ViewPoint))
((= whichFitting "45")(setq wst (getstring "[(W)/(S)/(T)]"))(if (= wst "W")(setq wst "溶接"))(if (= wst "S")(setq wst "ねじ込み"))(if (= wst "T")(setq wst "塩ビ"))(setq fit (strcat wst "45°エルボ "))(get_my_ViewPoint))
((= whichFitting "Street")(setq fit "ストリートエルボ ")(get_my_ViewPoint))
((= whichFitting "Kei")(setq fit "径違いエルボ ")(get_my_ViewPoint))
((= whichFitting "Water")(setq fit "給水栓エルボ ")(get_my_ViewPoint))
(t)
);cond
(princ)
);defun
;(get_my_Elbow)
実行ファイル(この実行ファイルはファイル名fit 視点vportの名前を決定するまでの途中のものです)
;■フランジ挿入
(defun c:insert_flange (/ Psize VPsize fit vpoint filename)
(get_my_Flange);フランジ種類選択
(princ)
);defun
;■エルボ挿入
(defun c:insert_elbow (/ Psize VPsize fit vpoint filename)
(get_my_Elbow)
(princ)
);defun
コマンドの流れです
コマンド: INSERT_ELBOW
[Els / 45 / Street / Kei 径違いエルボ / Water 給水栓エルボ]E
[(W)/(S)/(T)]W
[El エルボ付き / Side 側面 / Front 正面 / IL I&L / Top 平面 / Bottom 下面 / Cut 断面 / Oku 奥側 / No 視点なし]S
[No / Short / Ht / SHt ショートHT]N
; エラー: 関数が間違っています: "-側面"
以上ですがよろしくお願いします。
関数が間違っています: "-側面"
- mappy
- 2025/07/18 (Fri) 14:15:40 New