Author Topic: Batch printing problems  (Read 1368 times)

0 Members and 1 Guest are viewing this topic.

myloveflyer

  • Newt
  • Posts: 152
Batch printing problems
« on: January 26, 2011, 09:54:59 PM »
Need help!
Run the following program error.
"\\\\zwp\\EPSON EPL-2020 advanced"This printer is a local area network to other users, the program execution to stop here,Why?
If i change "pdffactory Pro" this printer,Sample program execution to the printer stopped there.

Code: [Select]
;;; huaji blog
(defun c:test (/ a4l aa ll n p1 p2 ss ww zhixing)
(setvar "osmode" 16384)
(setvar "cmdecho" 0)
(setq ss (ssget))
(setq n 0)
(repeat (sslength ss)
    (setq ent1 (alist (PLINE-GETPTLST (ssname ss n))))
    (setq p1 (nth 0 ent1))
    (setq p2 (nth 2 ent1))
    (setq ll (abs (- (car p2) (car p1))))
    (setq ww (abs (- (cadr p2) (cadr p1))))
    (if (> ll ww)
      (command "-plot"
        "y"
        "MODEL"
        "\\\\zwp\\EPSON EPL-2020 advanced"
        "A3"
        "Millimeters"
        "Landscape"
        "n"
        "w"
        p1
        p2
        "f"
        "c"
        "y"
        "acad.ctb"
        "y"
        "w"
        "n"
        "n"
        "y"
      )
      (command "-plot"
        "y"
        "MODEL"
        "\\\\zwp\\EPSON EPL-2020 advanced"
        "A3"
        "Millimeters"
        "Portrait"
        "n"
        "w"
        p1
        p2
        "f"
        "c"
        "y"
        "acad.ctb"
        "y"
        "w"
        "n"
        "n"
        "y"
      )
    )      ;if
    (setq n (1+ n))
)      ;repeat
)
(defun PLINE-GETPTLST (EN / LST ENT N)
(setq LST '()
ENT (entget EN)
)
(foreach N ENT
    (if (= (car N) 10)
      (setq LST (cons (cdr N) LST))
    )
)
(reverse LST)
)
(defun alist (lst / tlst tl n i k)
(setq xlst '()
tlst lst
k    (length tlst)
i    0
)
(while (> k 0)
    (setq tl '()
   n 0
   i 0
    )
    (setq l1 (nth 0 tlst))
    (while (< i k)
      (if (/= l1 (nth i tlst))
(setq tl (cons (nth i tlst) tl))
      )
      (setq i (1+ i))
    )
    (setq tlst (reverse tl)
   k    (length tlst)
    )
    (setq xlst (cons l1 xlst))
)
(setq xlst (reverse xlst))
)
« Last Edit: January 27, 2011, 10:19:50 AM by CAB »
Never give up !

nivuahc

  • Guest
Re: Batch printing problems
« Reply #1 on: January 27, 2011, 08:22:34 AM »
myloveflyer

would be easier to read if you enclose your code in

[code] ... your code here... [/code]

tags. :)

myloveflyer

  • Newt
  • Posts: 152
Re: Batch printing problems
« Reply #2 on: January 27, 2011, 07:45:33 PM »
nivuahc,thanks for you help.
But i didn't find your code, :cry:
Never give up !