Vla-setwindowtoplot

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


機能
印刷するレイアウトの範囲座標を指定する。


引数
  • vla-object … VLAオブジェクト
  • pt1 … 点
  • pt2 … 点


戻り値
nil


サンプル
(defun c:testPlotWindow ( / plt p1 point1
     pPt1 pPt1sa pt1 p2 point2 pPt2 pPt2sa pt2 )
  (vl-load-com)
  (setq *cadobj* (vlax-get-Acad-object))
  (setq *actdoc* (vla-get-ActiveDocument *cadobj*))
  (setq *actlay* (vla-Get-ActiveLayout *actdoc*))

  (setq plt (vla-get-plot *actdoc*))

  (vla-put-configname *actlay* "DWF6 ePlot.pc3")
  (vla-put-canonicalmedianame
    *actlay*
    "ISO_full_bleed_A3_(420.00_x_297.00_MM)"
    )
  (vla-put-paperunits *actlay* acMillimeters)
  (vla-put-plotrotation *actlay* ac0degrees)
  ; How to control the Plot Style Table
  ; (vla-put-StyleSheet *actlay* "HP LaserJet 4MV.ctb")

  (setq p1 (getpoint "\n左下点: "))
  (setq point1 (list (car p1) (cadr p1)))
  (setq pPt1 (vlax-make-safearray vlax-vbDouble '(0 . 1)))
  (setq pPt1sa (vlax-safearray-fill pPt1 point1))
  (setq pt1 (vlax-make-variant
              pPt1sa
              (logior vlax-vbarray vlax-vbDouble) )
  )

  (setq p2 (getpoint "\n右上点 : "))
  (setq point2 (list (car p2) (cadr p2)))
  (setq pPt2 (vlax-make-safearray vlax-vbDouble '(0 . 1)))
  (setq pPt2sa (vlax-safearray-fill pPt2 point2))
  (setq pt2 (vlax-make-variant
              pPt2sa
              (logior vlax-vbarray vlax-vbDouble) )
  )

  (vla-SetWindowToPlot *actlay* pt1 pt2)
  (vla-put-plottype *actlay* acWindow)

   (vla-plottofile plt "c:\\temp\\test.dwf" "DWF6 ePlot.pc3")

);_end_defun


関連事項