「Vla-get-templatedwgpath」の版間の差分
(ページの作成:「{{AutoLISP}} ; 構文 : (vla-get-templatedwgpath ''vla-object'') ; 機能 : スタートアップ ウィザードで使用されるテンプレート ファイルのパ...」) |
(相違点なし)
|
2015年1月12日 (月) 01:13時点における最新版
- 構文
- (vla-get-templatedwgpath vla-object)
- 機能
- スタートアップ ウィザードで使用されるテンプレート ファイルのパスを指定する。
- 引数
-
- vla-object … PreferencesFilesのVLAオブジェクト
- 戻り値
- パスの文字列
- サンプル
(vl-load-com)
(defun c:Example_TemplateDwgPath()
;; テンプレート ファイルのパスを取得・変更するサンプル
(setq acadObj (vlax-get-acad-object))
(setq preferences (vla-get-Preferences acadObj))
;; 元のテンプレートパス
(setq currTemplateDWGPath (vla-get-TemplateDwgPath (vla-get-Files preferences)))
(alert (strcat "元のTemplateDwgPath は " currTemplateDWGPath))
;; 変更後のテンプレートパス
(setq newTemplateDWGPath "TestTemplateDWGPath")
(vla-put-TemplateDwgPath (vla-get-Files preferences) newTemplateDWGPath)
(alert (strcat "新しい TemplateDwgPath は " newTemplateDWGPath))
;; 戻す
(vla-put-TemplateDwgPath (vla-get-Files preferences) currTemplateDWGPath)
(alert (strcat "TemplateDwgPath をリセット " currTemplateDWGPath))
)
関連事項