Vla-put-printerconfigpath

提供:GizmoLabs - だいたい CAD LISP なサイト
2015年1月12日 (月) 02:36時点におけるGizmon (トーク | 投稿記録)による版 (ページの作成:「{{AutoLISP}} ; 構文 : (vla-put-printerconfigpath ''vla-object'' ''path'') ; 機能 : プリンタ環境設定ファイルの位置を指定する。 ; 引数 :* vla...」)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
構文
(vla-put-printerconfigpath vla-object path)


機能
プリンタ環境設定ファイルの位置を指定する。
引数
  • vla-object … PreferencesFilesのVLAオブジェクト
  • path … プリンタ環境設定ファイルのドライブとパス。


戻り値
nil


サンプル

(vl-load-com)
(defun c:Example_PrinterConfigPath()
    ;; プリンタ環境設定ファイルのパスを取得設定するサンプル
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))
    
    ;; 元のプリンタ環境設定ファイルのパス
    (setq originalValue (vla-get-PrinterConfigPath (vla-get-Files preferences)))
    (alert (strcat "現在のプリンタ環境設定ファイルのパス : " originalValue))

    ;; プリンタ環境設定ファイルのパスを "C:\\temp\\" に変更
    (vla-put-PrinterConfigPath (vla-get-Files preferences) "C:\\temp\\")
    (setq newValue (vla-get-PrinterConfigPath (vla-get-Files preferences)))
    (alert (strcat "新しいプリンタ環境設定ファイルのパス: " newValue))

    ;; プリンタ環境設定ファイルのパスをリセット
    (vla-put-PrinterConfigPath (vla-get-Files preferences) originalValue)
    (alert (strcat "プリンタ環境設定ファイルのパスを元に戻す : " originalValue))
)

関連事項