Author Topic: one time plotting  (Read 2914 times)

0 Members and 1 Guest are viewing this topic.

ELOQUINTET

  • Guest
one time plotting
« on: October 25, 2004, 10:01:12 AM »
I am looking for any easy way to do one time plots. i'm thinking this would be easier to just explain it in psuedocode.

...ask user which space they want to be in model or paper
...-plot
...get current plotter and papersize
...uncheck save changes to layout
...change plotter from a to b
...change paper size from a to b
...allow user to pick window and select ok
...revert to previous settings

does anybody have something like this?

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
one time plotting
« Reply #1 on: October 25, 2004, 10:23:10 AM »
- Dan

Just work through the plot command options and think about what you need to ask the user and what you can supply via the code. Here are the plot options in 2005;
Code: [Select]

Command: -plot
Detailed plot configuration? [Yes/No] <No>: Y

Enter a layout name or [?] <24 X 36>:
Enter an output device name or [?] <HP DesignJet 750C-24x36.pc3>:
Enter paper size or [?] <Arch D - 24 x 36 in. (landscape)>:
Enter paper units [Inches/Millimeters] <Inches>:
Enter drawing orientation [Portrait/Landscape] <Landscape>:
Plot upside down? [Yes/No] <No>:
Enter plot area [Display/Extents/Layout/View/Window] <Layout>:
Enter plot scale (Plotted Inches=Drawing Units) or [Fit] <1:1>:
Enter plot offset (x,y) <0.00,0.00>:
Plot with plot styles? [Yes/No] <Yes>:
Enter plot style table name or [?] (enter . for none) <SVY-PlotStyle.ctb>:
Plot with lineweights? [Yes/No] <Yes>:
Scale lineweights with plot scale? [Yes/No] <No>:
Plot paper space first? [Yes/No] <No>:
Hide paperspace objects? [Yes/No] <No>:
Write the plot to a file [Yes/No] <N>:
Save changes to page setup [Yes/No]? <N>
Proceed with plot [Yes/No] <Y>: n
TheSwamp.org  (serving the CAD community since 2003)

ELOQUINTET

  • Guest
one time plotting
« Reply #2 on: October 25, 2004, 10:38:32 AM »
yeah i was thinking it would look something like that. i saw this script in another topic recently. i'm just not good at the whole formatting of lisp yet and figured someone else had surely done this already. maybe i'll give it a shot if i get some free time today

Code: [Select]
;;;
;;;A1 STANDARD PAGE SETUP SCRIPT
;;;
;;change to paper space
tilemode
0
;;plot the drawing
-plot
;;Detailed plot configuration?
yes
;;Enter a layout name

;;Enter an output device name
\\glasgow\1050
;;Enter paper size
Oversize: ISO A1  (landscape)
;;Enter paper units [Inches/Millimeters]
millimeters
;;Enter drawing orientation [Portrait/Landscape]
landscape
;;Plot upside down? Yes/No
no
;;Enter plot area [Display/Extents/Layout/View/Window]
extents
;;Enter plot scale (Plotted Millimeters=Drawing Units) or [Fit]
1:1
;;Enter plot offset (x,y) or [Center]
center
;;Plot with plot styles? [Yes/No]
yes
;;Enter plot style table name
STANDARD.ctb
;;Plot with lineweights? [Yes/No]
no
;;Scale lineweights with plot scale? [Yes/No]
no
;;Plot paper space first? [Yes/No]
no
;;Hide paperspace objects? [Yes/No]
no
;;Write the plot to a file [Yes/No]
NO
;;Save changes to page setup [Yes/No]
YES
;;Proceed with plot [Yes/No]
yes
;;;SAVE THE DRAWING
QSAVE
;;;
;;;END OF SCRIPT
;;;

ELOQUINTET

  • Guest
one time plotting
« Reply #3 on: October 25, 2004, 10:52:34 AM »
well the script route won't work because of the spaces  :cry:

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
one time plotting
« Reply #4 on: October 25, 2004, 12:24:09 PM »
Quote from: eloquintet
well the script route won't work because of the spaces  :cry:
Didn't Keith just post something about spaces & sctipts?
Maybe to use quotes?
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.

ELOQUINTET

  • Guest
one time plotting
« Reply #5 on: October 25, 2004, 12:42:07 PM »
yeah i saw that but it's still not working. it keeps hanging when i specify the new plotter, maybe because of the formatting? any suggestions?


Code: [Select]
;;;
;;;one time plot
;;;
;;change to paper space
tilemode
0
;;plot the drawing
-plot
;;Detailed plot configuration?
yes
;;Enter a layout name
"36 X 24 L"
;;Enter an output device name
"\\SVNY1\HP LaserJet 4000 Series PCL 6"
;;Enter paper size
Letter  
;;Enter paper units [Inches/Millimeters]
Inches
;;Enter drawing orientation [Portrait/Landscape]
landscape
;;Plot upside down? Yes/No
no
;;Enter plot area [Display/Extents/Layout/View/Window]
window
;;Enter plot scale (Plotted Millimeters=Drawing Units) or [Fit]
1:1
;;Enter plot offset (x,y) or [Center]
center
;;Plot with plot styles? [Yes/No]
yes
;;Enter plot style table name
Aval.ctb
;;Plot with lineweights? [Yes/No]
no
;;Scale lineweights with plot scale? [Yes/No]
no
;;Plot paper space first? [Yes/No]
no
;;Hide paperspace objects? [Yes/No]
no
;;Write the plot to a file [Yes/No]
NO
;;Save changes to page setup [Yes/No]
no
;;Proceed with plot [Yes/No]
yes
;;;END OF SCRIPT
;;;

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
one time plotting
« Reply #6 on: October 25, 2004, 01:16:45 PM »
Have you tyied this
"HP LaserJet 4000 Series PCL 6"
and this
"\SVNY1\HP LaserJet 4000 Series PCL 6"

Does this work?
"\\glasgow\1050"
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.

PDJ

  • Guest
one time plotting
« Reply #7 on: October 25, 2004, 01:21:27 PM »
Here's a couple I've used.  Just change the parts you need and go for it.

Code: [Select]
(defun C:1055()
  (command "-PLOT" "Y" "" "HP1055cm" "ANSI D - 22 X 34 IN. (LANDSCAPE)" "INCHES" "LANDSCAPE" "Y" "extents" "1:1" "-0.2, -0.1" "Y" "HP Full Mono.CTB" "Y" "N" "N" "N" "N" "Y" "Y")
(print)
(print "Just launched that masterpiece to the HP1055 Plotter..")
(print)
)
(defun C:XEROX()
  (command "-PLOT" "Y" "" "XEROX 8830 BOND.PC3" "ARCH D (24.00 x 36.00 Inches)" "INCHES" "LANDSCAPE" "N" "EXTENTS" "1:1" "CENTER" "Y" "Xerox Full.ctb" "Y" "N" "N" "N" "N" "Y" "Y")
(print)
(print "Just launched that drawing to the Xerox plotter..")
(print)
)


This one was for a networked printer.. Took me a good while to figure out how many \'s needed to be around that printer name, believe me..

Code: [Select]
(defun C:pdf()
  (command "-PLOT" "Y" "" "\\\\cartman\\a_pdf" "LETTER" "INCHES" "LANDSCAPE" "N" "EXTENTS" "Fit" "0,0" "Y" "CENTRAL OFFICE.CTB" "Y" "A" "N" "N" "Y")
(print)
(print "Just launched that puppy to the PDF printer..")
(print)
)

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
one time plotting
« Reply #8 on: October 25, 2004, 01:22:22 PM »
This is no where close to being complete but it may give you an idea.
Code: [Select]

(defun c:q_plot (/ choose-plotter choose-paper
                   plotter paper p1 p2)

  ;; no error trapping

  (defun choose-plotter (/ print-name lst)

    (defun print-name (num)
      (strcat "["(itoa num)"] " (cdr (assoc num lst)))
      )

    (setq lst
 (list
   (cons 1 "Savin 9922DP PCL")
   (cons 2 "HP LaserJet 4V")
   (cons 3 "HP DesignJet 750C-24x36")
   (cons 4 "PDFCreator")
   )
 )

    (princ
      (strcat "\n"
     (print-name 1)"\n"
     (print-name 2)"\n"
     (print-name 3)"\n"
     (print-name 4)
     )
      )

    (initget 1)
    (if (setq choice (getint "\nPlotter Number: "))
      (cdr (assoc choice lst))
      )

    )

  (defun choose-paper (/ lst choice)

    (defun print-name (num)
      (strcat "["(itoa num)"] " (cdr (assoc num lst)))
      )

    (setq lst
 (list
   (cons 1 "Legal")
   (cons 2 "Tabloid")
   (cons 3 "Letter")
   )
 )

    (princ
      (strcat "\n"
     (print-name 1)"\n"
     (print-name 2)"\n"
     (print-name 3)
     )
      )

    (initget 1)
    (if (setq choice (getint "\nPlotter Number: "))
      (cdr (assoc choice lst))
      )
    )

  ;; body of main function starts here

  (vl-cmdf
    "_.plot"
    "Yes"
    "" ;Enter a layout name or [?] <24 X 36>:
    (choose-plotter)
    (choose-paper)
    "" ;Enter paper units [Inches/Millimeters] <Inches>:
    "P" ;Enter drawing orientation [Portrait/Landscape] <Landscape>:
    "N" ;Plot upside down? [Yes/No] <No>:
    "Window" ;Enter plot area [Display/Extents/Layout/View/Window] <Layout>:
    (setq p1 (getpoint "\nLower left corner of window: "))
    (getcorner p1 "nUpper right corner: ")
    "F" ;Enter plot scale (Plotted Inches=Drawing Units) or [Fit] <1:1>:
    "" ;Enter plot offset (x,y) <0.00,0.00>:
    "Y" ;Plot with plot styles? [Yes/No] <Yes>:
    "." ;Enter plot style table name or [?] (enter . for none) <>:
    "Y" ;Plot with lineweights? [Yes/No] <Yes>:
    "Y" ;Scale lineweights with plot scale? [Yes/No] <No>:
    "" ;Enter shade plot setting [As displayed/Wireframe/Hidden/Rendered] <As displayed>
    "N" ;Plot paper space first? [Yes/No] <No>:
    "Y" ;Hide paperspace objects? [Yes/No] <No>:
    "N" ;Write the plot to a file [Yes/No] <N>:
    "N" ;Save changes to page setup [Yes/No]? <N>
    "Y" ;Proceed with plot [Yes/No] <Y>
    )
  (princ)
  )
TheSwamp.org  (serving the CAD community since 2003)

pmvliet

  • Guest
one time plotting
« Reply #9 on: October 27, 2004, 08:52:37 PM »
I posted what I did, I just need to find it.

let me search

pmvliet

  • Guest
one time plotting
« Reply #10 on: October 27, 2004, 08:59:11 PM »
Here it is:

http://theswamp.org/phpBB2/viewtopic.php?t=1572&highlight=plot[url]

scroll down about 3/4 way

Pieter

PDJ

  • Guest
one time plotting
« Reply #11 on: October 27, 2004, 09:12:36 PM »
Ummm.. Did mine not work or something??

pmvliet

  • Guest
one time plotting
« Reply #12 on: October 28, 2004, 12:31:07 PM »
PDJ,
I don't know that anyone has an objection to your system, but rather everyone throwing in their two cents worth. I do know that it does get confusing knowing what each character is relative to. That is why I comment my script. If you plot MS it's one thing and PS has a different set of questions. Now it seems different versions will have different questions.

Pieter

I myself don't know if there is any real benefit from having a script, lisp, VBA or any other language/routine.