Author Topic: Printable area/paper background  (Read 3014 times)

0 Members and 1 Guest are viewing this topic.

hudster

  • Gator
  • Posts: 2848
Printable area/paper background
« on: June 10, 2005, 07:59:04 AM »
this lisp used to work, but now I have to uncheck "display printable area" and "display paper background" to get it to work.

Code: [Select]
;;;
;;; TITLE:AUTOFILE
;;;
;;; Copyright (C) 2005 by Andy Hudson
;;;
;;; Permission to use, copy, modify, and distribute this
;;; software and its documentation for any purpose and without
;;; fee is hereby granted
;;;
;;; THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR
;;; IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY
;;; PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY
;;; DISCLAIMED.
;;;
;;; Andy Hudson
;;; April 2005
;;;
;;;-------------------------------------------------------------
;;; Description:
;;;
;;; Routine to determine drawing size and then
;;; plot to file using appropriate sheet size
;;;
;;;-------------------------------------------------------------
;;; COMMAND LINE: AUTOFILE
;;;-------------------------------------------------------------
(defun c:AUTOFILE
       (/ limin limax limit-width limit-height plot-it)
  ;;
  (setvar "TILEMODE" 0)
  ;;-----------------------------------
  ;;-----------------------------------
  (defun plot-it (device-name paper-size /)
    (command "zoom" "extents")     ;zoom extents
    (command "-PLOT"               ;Plot the drawing
             "Y"                   ;Detailed plot configuration
             ""                    ;Enter a layout name
             device-name           ;Enter an output device name
             paper-size            ;Enter paper size
             "millimeters"         ;Enter paper units [Inches/Millimeters]
             "landscape"           ;Enter drawing orientation [Portrait/Landscape]
             "no"                  ;Plot upside down? Yes/No
             "extents"             ;Enter plot area
             "1:1"                 ;Enter plot scale
             "center"              ;Enter plot offset
             "yes"                 ;Plot with plot styles?
             "rybka battle - STANDARD.ctb"
                                   ;Enter plot style table name
             "yes"                 ;Plot with lineweights?
             "no"                  ;Scale lineweights with plot scale?
             "no"                  ;Plot paper space first?
             "no"                  ;Hide paperspace objects?
             "yes"                 ;Write the plot to a file
             ""                    ;filename
             "NO"                  ;Save changes to page setup
             "yes"                 ;Proceed with plot
            )
  )
  ;;-----------------------------------
  ;;-----------------------------------  
;;;GET THE CO-ORDINATES
  (setq limin        (getvar "LIMMIN")
        limax        (getvar "LIMMAX")
        limit-width  (- (car limax) (car limin))
        limit-height (- (cadr limax) (cadr limin))
  )
  ;;
  (cond ((>= limit-width 1180)
         (princ "\nA0")
         (setq device-name "\\\\GLASGOW\\1050"
               paper-size  "ISO A0 - 841 x 1189 mm."
         )
        )
        ((and (< limit-width 1180)
              (>= limit-width 840)
          )
         (princ "\nA1")
         (setq device-name "\\\\GLASGOW\\1050"
               paper-size  "ISO A1 - 594 x 841 mm. (landscape)"
         )
        )
((and (<= limit-width 420)
              (>= limit-width 297)
          )
         (princ "\nA3")
         (setq device-name "\\\\GLASGOW\\1050"
               paper-size  "ISO A3 - 297 x 420 mm. (landscape)"
)
))
  ;;
  (if paper-size
    (plot-it device-name paper-size)
  )
  ;;
  (princ)
)


Or is there a way I can change these setting via a lisp?
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

daron

  • Guest
Printable area/paper background
« Reply #1 on: June 10, 2005, 08:55:33 AM »
In the vlide type (vlax-get-acad-object), highlight it and select the inspect (microscope) button. You'll get a popup that you can double-click items and get more info. Look under ActiveDocument and then look for preferences. If you find something that'll work use it. If you need help in how to use it, ask. We'll show you.

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Printable area/paper background
« Reply #2 on: June 11, 2005, 09:02:34 AM »
Hi Hudster
Code: [Select]
(vl-load-com)
(setq DspObj (vla-get-Display
              (vla-get-Preferences (vlax-get-acad-object))
             )
)
(vla-put-LayoutDisplayMargins DspObj :vlax-false)
(vla-put-LayoutDisplayPaper DspObj :vlax-false)
Cheers
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18