26.10.12

Imprime LAYOUTs do intervalo

(defun c:PINT ()
(setq PGINI '()) (setq PGFIM '())
(setq PGATUAL '()) (setq PGINTER '())

(if (= PGINI nil) (progn
  (setq PGINI (getint "\n|| Página inicial: "))
  (setq PGFIM (getint "\n|| Página final..: "))
) )
(setq PGATUAL PGINI)
(repeat (- (1+ PGFIM) PGINI)
 (progn
  (setq PGINTER (append PGINTER (list PGATUAL)))
  (setq PGATUAL (1+ PGATUAL))
 )
)
(setq PGATUAL '())
(princ (strcat "\n|| Iniciando a impressão do intervalo: " (itoa PGINI) " -> " (itoa PGFIM)))
(foreach LAY PGINTER (command "-PLOT" "no"
 (if (< LAY 10)
  (strcat "0" (itoa LAY))
  (itoa LAY)
 )
 "previous plot" "" "" "y" "y") )
(princ (strcat "\n|| Fim da Impressão "))
(princ PGINTER)(princ)
)

Nenhum comentário: