Vla-setlayoutstoplot
- 構文
- (vla-setlayoutstoplot vla-object list)
- 機能
- 印刷する 1 つまたは複数のレイアウトを指定する。(旧式のため無くなる予定)
- 引数
-
- vla-object … VLAオブジェクト
- list … レイアウト名の配列
- 戻り値
- nil
- サンプル
(defun c:PLOTALL( / doc)
(setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))
(setq lstLayouts nil
arSize 0)
(vlax-for layout (vla-get-layouts doc)
;; Check to see if a plot device is assigned to the layout, if not it will not be plotted
;; プロットデバイスがレイアウトに割り当てられているかどうかを確認し、ない場合プロットしない
(if (and
(/= (strcase (vla-get-ConfigName layout)) "NONE")
(= (vla-get-ModelType layout) :vlax-false)
)
(progn
(if (= lstLayouts nil)
(setq lstLayouts (list (vla-get-Name layout)))
(setq lstLayouts (append lstLayouts (vla-get-Name layout)))
))))
;; Create an array for all the layouts to be plotted
;; すべてのレイアウトの配列を作成
(setq arLayouts (vlax-make-safearray vlax-vbString (cons 0 (1- (length lstLayouts)))))
;; Add the layout names to the array
;; 配列にレイアウト名を追加
(foreach item lstLayouts
(progn
(vlax-safearray-put-element arLayouts arSize item)
(setq arSize (1+ arSize))
))
;; Plot the layout to the device
;; デバイスにレイアウトをプロット
(vla-SetLayoutsToPlot (vla-get-Plot doc) arLayouts)
(vla-PlotToDevice (vla-get-Plot doc))
(princ)
)
関連事項