「Vla-put-historylines」の版間の差分
| 細編集の要約なし | 細編集の要約なし | ||
| 28行目: | 28行目: | ||
| (defun c:PutHistoryLines (/ hl) | (defun c:PutHistoryLines (/ hl) | ||
|    (vl-load-com) |    (vl-load-com) | ||
|   (setq *prefs* (vla-get-preferences (vlax-get-Acad-Object))) | |||
|    (if (setq hl   |    (if (setq hl   | ||
|          (getint |          (getint | ||
| 33行目: | 34行目: | ||
|              (itoa   |              (itoa   | ||
|                (vla-get-HistoryLines |                (vla-get-HistoryLines | ||
|                  (vla-get-display |                  (vla-get-display *prefs*))) | ||
|              ">: "))) |              ">: "))) | ||
|      (if (or (< hl 25) (> hl 2048)) |      (if (or (<  hl 25) (> hl 2048)) | ||
|        (prompt "\n25~2048の間") |        (prompt "\n25~2048の間") | ||
|        (vla-put-HistoryLines (vla-get-display (vla-get-preferences (vlax-get-acad-object))) hl) |        (vla-put-HistoryLines (vla-get-display (vla-get-preferences (vlax-get-acad-object))) hl) | ||
2013年7月15日 (月) 16:50時点における最新版
- 構文
- (vla-put-historylines vla-object num)
- 機能
- メモリに保存するテキスト ウィンドウ内のテキストの行数を設定する。
- 引数
- 
- vla-object … VLA オブジェクト
- num … 数値
 
- 戻り値
- nil
- サンプル
(setq *prefs* (vla-get-preferences (vlax-get-Acad-Object)))
(vla-get-historylines (vla-get-display *prefs*))
400
(vla-put-historylines (vla-get-display *prefs*) 500)
(defun c:PutHistoryLines (/ hl)
  (vl-load-com)
  (setq *prefs* (vla-get-preferences (vlax-get-Acad-Object)))
  (if (setq hl 
        (getint
          (strcat "\n履歴行数 <"
            (itoa 
              (vla-get-HistoryLines
                (vla-get-display *prefs*)))
            ">: ")))
    (if (or (<  hl 25) (> hl 2048))
      (prompt "\n25~2048の間")
      (vla-put-HistoryLines (vla-get-display (vla-get-preferences (vlax-get-acad-object))) hl)
  ))
  (princ)
)
関連事項
