Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a printable frame, how do I set it to printable by selecting an object (polyline, block, xref) ?
Solved! Go to Solution.
I have a printable frame, how do I set it to printable by selecting an object (polyline, block, xref) ?
Solved! Go to Solution.
so this would just set the plotarea to the points you select. If you manage to retrieve the corner points of your object extents you could adjust that.
(defun c:setplotarea (/ vlax-2d-point p01 p1 p2 layout)
(defun vlax-2d-point (pt)
(vlax-make-variant
(vlax-safearray-fill
(vlax-make-safearray vlax-vbDouble '(0 . 1))
(list (car pt) (cadr pt))
)
)
)
(setq layout (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object)))
p1 (vlax-2d-point (setq p01 (getpoint "\nFirst Point for Plotarea: ")))
p2 (vlax-2d-point (getcorner p01 "\nSecond point for Plotarea: "))
)
(vla-put-plottype layout acWindow)
(vla-setwindowtoplot layout p1 p2)
(princ)
)