Author Topic: plot user size  (Read 3328 times)

0 Members and 1 Guest are viewing this topic.

dussla

  • Bull Frog
  • Posts: 297
plot user size
« on: March 16, 2010, 12:29:11 AM »
hi firend
i meet new idea .
that is plot user size .

i use  eps file  plot often.
so i print in big plotter for client.
print size is   not regural size  like a1 a2 a4.
that is   1500* 2000 ,  2000 * 1450 etc .
so i modify  plot size  as adding custom paper sizes   custom in plotters mannger
is this process possible  with lisp  (  paper size add)
i tried many time
but i can;t find   vlax funtion  with my skill

1. plot -eps lisp
2.  enter  output size
3. plot~~~

example )
(setq  my wanted size  ( getint) )
( commnad "-plot "
                  "yes"
                 "model"
                 " eps a3.pc3"
                 "  my wanted size " <----------------------------------   this routine ~~~~~~~~~~~~~~~~
                 " millimeters"
                 "landscape"
 .               "no"
                  p1
                  p2
                 "fit"
..
.
.

.
)
« Last Edit: March 16, 2010, 12:37:16 AM by dussla »

Lee Mac

  • Seagull
  • Posts: 12929
  • London, England
Re: plot user size
« Reply #1 on: March 16, 2010, 11:35:11 AM »
To Plot using VLISP you would have to set up a Plot Configuration to the settings that you want, and then use the vla-PlottoDevice method - it is quite involved relative to the command call alternative, but it is possible.

I wrote this a while back, might serve as an example (this example is Plotting to a FILE though)

Code: [Select]
(defun c:P2F (/ doc itemp SetPS PlottoFile pgset file)
  ;; Lee Mac  ~  13.01.10
  (vl-load-com)

  (defun doc nil
    (setq *doc* (cond (*doc*) ((vla-get-ActiveDocument
                                 (vlax-get-acad-object))))))
 

  (defun itemp (collection item / result)
      (if (not (vl-catch-all-error-p
                 (setq result
                        (vl-catch-all-apply (function vla-item)
                          (list collection item)))))
        result))
 

  (defun SetPS (lay setup)     
    (and (setq lay   (itemp (vla-get-layouts (doc)) lay))
         (setq setup (itemp (vla-get-PlotConfigurations (doc)) setup))
         (not (vla-copyfrom lay setup))))
 
 
  (defun PlottoFile (file pc3 cpy)
    (setq plt (vla-get-plot (doc)))
   
    (and cpy  (eq 'INT (type cpy)) (vla-put-NumberofCopies plt cpy))   
    (eq :vlax-true (vla-plottofile plt file pc3)))


  ;; ----------------------------------------------------

  (if (and (setq pgset (getstring t "\nSpecify Page Setup to Use: "))
           (SetPS (getvar 'CTAB) pgset))
   
    (if (setq file (getfiled "Output File" "" "plt" 1))
     
      (PlottoFile file nil 1))

    (princ "\n** Page Setup Not Found **"))
     
  (princ))


Haven't tested it lately however...

dussla

  • Bull Frog
  • Posts: 297
Re: plot user size
« Reply #2 on: March 16, 2010, 12:32:38 PM »
lee mac   
thank you for answer ~
but that is not my wanting routine ~~~~~~~~~~~~~~~~~

i need only  page custome size input

example )

Specify Page Setup to Use ->      put your wanted output paper size   (  1400* 200      2322 * 4300 ...............................etc ) 
when i  plot only  without setuping  custom size in advance


can you understand my intention ? ~~~~~
at any way, thank you for answeing always ~

Lee Mac

  • Seagull
  • Posts: 12929
  • London, England
Re: plot user size
« Reply #3 on: March 16, 2010, 12:37:19 PM »
I know it is not your routine - it is an example of the VL functions involved in plotting.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: plot user size
« Reply #4 on: March 16, 2010, 02:12:36 PM »
Have you tried this?
Code: [Select]
(setq  size  ( getint "\nEnter size: ") )
( commnad "-plot "
                  "yes"
                 "model"
                 " eps a3.pc3"
                 (itoa size)  ; <----------------------------------   this routine ~~~~~~~~~~~~~~~~
                 " millimeters"
                 "landscape"
                 "no"
                  p1
                  p2
                 "fit"
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: plot user size
« Reply #5 on: March 16, 2010, 02:18:00 PM »
If you want a better key word routine to catch error try this:
http://www.theswamp.org/index.php?topic=15173.0
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

dussla

  • Bull Frog
  • Posts: 297
Re: plot user size
« Reply #6 on: March 19, 2010, 12:38:08 AM »
i  found    custom user setup file  save to be saved in pmp
pmp file is packed
so i seek  pmp viewer modify 
http://www.noliturbare.com/plot-print/print-ctbs-and-more

if someone use this info , someone make  short util for custom paper size ~~