Vla-get-printerdescpath

提供:GizmoLabs - だいたい CAD LISP なサイト
構文
(vla-get-printerdescpath vla-object)


機能
プリンタ説明ファイルの位置を取得する。
引数
  • vla-object … PreferencesFilesのVLAオブジェクト


戻り値
プリンタ説明ファイルのドライブとパス。


サンプル
(vl-load-com)
(defun c:Example_PrinterDescPath()
    ;; プリンタ説明ファイルの位置を取得・変更するサンプル
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))
    
    ;; 現在の設定
    (setq originalValue (vla-get-PrinterDescPath (vla-get-Files preferences)))
    (alert (strcat "現在のプリンタ説明ファイルの位置 : " originalValue))

    ;; プリンタ説明ファイルの位置を "C:\\temp\\" に変更
    (vla-put-PrinterDescPath (vla-get-Files preferences) "C:\\temp\\")
    (setq newValue (vla-get-PrinterDescPath (vla-get-Files preferences)))
    (alert (strcat "新しいプリンタ説明ファイルの位置: " newValue))

    ;; プリンタ説明ファイルの位置を元に戻す
    (vla-put-PrinterDescPath (vla-get-Files preferences) originalValue)
    (alert (strcat "プリンタ説明ファイルの位置を元に戻す: " originalValue))
)

関連事項