Author Topic: Plottabs help  (Read 10622 times)

0 Members and 1 Guest are viewing this topic.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Plottabs help
« Reply #15 on: January 18, 2007, 11:50:43 AM »
That is the "Page Setup name"
So it is not in the drawing or the name is not matching, perhaps a case sensitive issue in the name.
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: Plottabs help
« Reply #16 on: January 18, 2007, 12:12:04 PM »
Try this: At line 167 replace the cond statment with this:
Code: [Select]
      (cond
        ((not (member (strcase plot-config) (mapcar 'strcase config-list)))
         (setq err_str "Bad plot config name.")
        )
        ((not (member plot-order '("Alpha" "Numeric" "Tab")))
         (setq err_str "Bad plot order name, case sensitive.")
        )
      ) ; end cond
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
Re: Plottabs help
« Reply #17 on: January 18, 2007, 12:51:03 PM »
ok cab i discovered one of the page setups had a problem with caps so i fixed that and replaced to cond in the code. when i run it now i don't get an error message but help pops up at the end and nothing prints. any recommendations?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Plottabs help
« Reply #18 on: January 18, 2007, 01:14:02 PM »
Let me run some test here and I'll get back to you.

What HELP pops up, the PlotTabs Help?
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
Re: Plottabs help
« Reply #19 on: January 18, 2007, 01:49:19 PM »
no autocad help pops up to the main page. i can see it processing at the command line but it's too fast to read what's happening and when i open the text window i don't see any of the script so not sure what's going on. thanks for looking into this because it would really be great not only for me but others if plottabs could be used on multiple drawings. i really appreciate all that you do for me. so what do you want for christmas this year?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Plottabs help
« Reply #20 on: January 18, 2007, 08:04:26 PM »
Christmas? Why ACAD2007  8-)

Try the attached file.
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: Plottabs help
« Reply #21 on: January 18, 2007, 08:21:15 PM »
I don't know it this would be any easier, but you could create a helper lisp like this:

Code: [Select]
(defun PlotHelper (Setups)
 (foreach ps Setups
  (sub_plottabs
      ;;  Option variables passed to this routine in this order
      (list
        (car ps)  ;  plot-config    Config Name if plot, default to "Current"
        (nth 2 ps);  plot-qty       number of copies of each sheet
        "Tab"     ;  plot-order     Sort order of tabs "Alpha" "Numeric" "Tab" order
        (cadr ps) ;  revorder       t/nil Reverse the order of plots
        nil       ;  savelayout     Always set to True- Not an option in this version
        t         ;  collatesets    t/nil  Collate plan sets when more than one plotted
        t         ;  excludetab     t/nil  Flag to exclude tabs with flag character
        "~"       ;  excludechr     "~"  Character marker for exclude tabs
        nil       ;  zoom-all       t/nil  Zoom layout before plotting
        nil       ;  PlotToFile     t/nil 
        t         ;  PlotAllTabs    Ignore the Pick List of Tabs
        T         ;  setlaystate    ACAD>2000 set layer state by name of tab before plotting
        ""        ;  MyPath         Path for 'Plot To File'
        "*"       ;  Tabs2Plot      List of tab names  ("Sheet 1" "Sheet 2" "Sheet*") wild card ok
     )
  ) ; end sub_plottabs
 ) ; end foreach
)

Then use this as your script.

Code: [Select]
OPEN
 "d:\Drawings\M-2630EM ONE CHRISTINA CRESCENT\COMPLETE SUBMISSION\DETAILS.dwg"
(if (and (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
            (or PlotHelper   (/= (load "plotHelper.lsp" "fail") "fail")))
  (PlotHelper '(("d-prot-500ps" nil 1) ("d-prot Xerox510" t 5) ("d-prot-800" nil 1) ("small_copy" nil 3) ("HP LASER 11x17" nil 1)))
  (princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
close
Y

Open
"d:\Drawings\M-2464EM\M-2464EF\umdnj elevations.dwg"
(if (and (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
            (or PlotHelper   (/= (load "plotHelper.lsp" "fail") "fail")))
  (PlotHelper '(("d-prot-500ps" nil 1) ("d-prot Xerox510" t 5) ("d-prot-800" nil 1) ("small_copy" nil 3) ("HP LASER 11x17" nil 1)))
  (princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
close
Y


OR just remove the comments in the batch like this:

Code: [Select]
OPEN
 "d:\Drawings\M-2630EM ONE CHRISTINA CRESCENT\COMPLETE SUBMISSION\DETAILS.dwg"
(if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
  (foreach ps  '(("d-prot-500ps" nil 1) ("d-prot Xerox510" t 5) ("d-prot-800" nil 1) ("small_copy" nil 3) ("HP LASER 11x17" nil 1))                                                                             
    (sub_plottabs (list  (car ps)  (nth 2 ps) "Tab" (cadr ps) nil t t "~" nil nil t T "" "*"))                                                                         
  )
  (princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
close
Y

Open
"d:\Drawings\M-2464EM\M-2464EF\umdnj elevations.dwg"
(if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
  (foreach ps  '(("d-prot-500ps" nil 1) ("d-prot Xerox510" t 5) ("d-prot-800" nil 1) ("small_copy" nil 3) ("HP LASER 11x17" nil 1))                                                                             
    (sub_plottabs (list  (car ps)  (nth 2 ps) "Tab" (cadr ps) nil t t "~" nil nil t T "" "*"))                                                                         
  )
  (princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
close
Y
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
Re: Plottabs help
« Reply #22 on: January 18, 2007, 09:05:45 PM »
ok i will have to try these out tomorrow and let you know how it goes. i need to play around with the options in hurricane to get the results i want as well. thanks i'll give it a try.

ELOQUINTET

  • Guest
Re: Plottabs help
« Reply #23 on: January 19, 2007, 09:26:47 AM »
cab i downloaded the updated lisp and created the plothelper and modified my script. when the program creates the batch script it put the open and whatever drawings i specify it to run the script on into the batch script so i just put the body as my initial script like below. when i run any of the variations nothing happens at all  :cry: not sure what is going on

Code: [Select]
(if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
  (foreach ps  '(("d-prot-500ps" nil 1) ("d-prot Xerox510" t 5) ("d-prot-800" nil 1) ("small_copy" nil 3) ("HP LASER 11x17" nil 1))                                                                             
    (sub_plottabs (list  (car ps)  (nth 2 ps) "Tab" (cadr ps) nil t t "~" nil nil t T "" "*"))                                                                         
  )
  (princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
close
Y

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Plottabs help
« Reply #24 on: January 19, 2007, 09:44:12 AM »
Create a script file with this & it will not close the opened file. Then you can look at the command line output to see what happened
Code: [Select]
OPEN
 "d:\Drawings\M-2630EM ONE CHRISTINA CRESCENT\COMPLETE SUBMISSION\DETAILS.dwg"
(if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
  (foreach ps  '(("d-prot-500ps" nil 1) ("d-prot Xerox510" t 5) ("d-prot-800" nil 1) ("small_copy" nil 3) ("HP LASER 11x17" nil 1))
    (setq *ptdebug* t)                                                                           
    (sub_plottabs (list  (car ps)  (nth 2 ps) "Tab" (cadr ps) nil t t "~" nil nil t T "" "*"))                                                                         
  )
  (princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
<<close>>
<<Y>>

PS  I'll be back in 2-3 hours, post your command line ouput & I'll fix it.  :-)
« Last Edit: January 19, 2007, 09:49:23 AM by CAB »
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
Re: Plottabs help
« Reply #25 on: January 19, 2007, 10:41:45 AM »
cab here's what i got at the command line. i see it has something to do with the plot to file path and i was trying to mess around with it but had no luck.


Code: [Select]
Enter name of drawing to open <.>: "d:\Drawings\M-2630EM ONE CHRISTINA
CRESCENT\COMPLETE SUBMISSION\DETAILS.dwg"

Opening an AutoCAD 2004 format file.
Regenerating layout.
Regenerating model.

AutoCAD Express Tools Copyright © 2002-2004 Autodesk, Inc.

AutoCAD menu utilities loaded.
AutoCAD menu utilities loaded.
Command: (SETVAR "MODEMACRO" "Drawing 1 of 2")
"Drawing 1 of 2"

Command: (if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
(_>   (foreach ps  '(("d-prot-500ps" nil 1) ("d-prot Xerox510" t 5)
("d-prot-800" nil 1) ("small_copy" nil 3) ("HP LASER 11x17" nil 1))
((_>     (setq *ptdebug* t)
((_>     (sub_plottabs (list  (car ps)  (nth 2 ps) "Tab" (cadr ps) nil t t "~"
nil nil t T "" "*"))
((_>   )
(_>   (princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
(_> )
Plot Tabs is loaded, Enter PLotTabs to run.
PlotTabs011407 running.
* * * *    S t a r t i n g   t h e   P l o t     * * * *
* * * *    Debug Mode is ON     * * * *
=-=-=-=-=-=-=-=-=-=   DEBUG MODE =-=-=-=-=-=-=-=-=-=-=
  * * * *    Variable Dump     * * * *
-> d-prot-500ps [Plot-Config]- Name if plot, default to Current
-> 1 [Plot-QTY]- number of copies of each sheet
-> Tab [Plot-order]- Sort order of tabs "Alpha" "Numeric" "Tab" order
-> False [RevOrder]- t/nil Reverse the order of plots
-> True [PlotAllTabs]- t/nil Plot All tabs or use picks
-> True [setlaystate]- t/nil set layer state per tab name
-> False [PlotToFile]- Flag
->  [MyPath]- Path for 'Plot To File'; error: bad argument type: fixnump: nil

Command: <<close>>
Unknown command "<<CLOSE>>".  Press F1 for help.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Plottabs help
« Reply #26 on: January 19, 2007, 01:29:43 PM »
One more time. :)
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
Re: Plottabs help
« Reply #27 on: January 19, 2007, 04:49:43 PM »
hey cab it printed the first drawing collated to all printers as anticipated but what it didn't do was print the second drawing to any printers. this is a powerful tool as is but it would be super if it printed multiple drawings because like i said our drawing sets can utilize 5 or more dwgs. i just want to know if it is intended to do so and if i just need to play with some settings maybe in hurricane. thanks you're the best

Code: [Select]
; ***************************************************************
;  HURRICANE 6.5.13 - SCRIPT CREATED 1/19/2007 : 4:28:02 PM
; ***************************************************************
_OPEN
"d:\Drawings\M-2630EM ONE CHRISTINA CRESCENT\COMPLETE SUBMISSION\DETAILS.dwg"
; << START OF PRE-USERSCRIPT COMMANDS >>
(SETVAR "MODEMACRO" "Drawing 1 of 2")
; << START OF USER SCRIPT >>
(if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
  (foreach ps  '(("d-prot-500ps" nil 1) ("d-prot Xerox510" t 5) ("d-prot-800" nil 1) ("small_copy" nil 3) ("HP LASER 11x17" nil 1))
    (setq *ptdebug* t)                                                                           
    (sub_plottabs (list  (car ps)  (nth 2 ps) "Tab" (cadr ps) nil t t "~" nil nil t T "" "*"))                                                                         
  )
  (princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
close
Y
_QSAVE
_OPEN
"d:\Drawings\M-2464EM\M-2464EF\umdnj elevations.dwg"
; << START OF PRE-USERSCRIPT COMMANDS >>
(SETVAR "MODEMACRO" "Drawing 2 of 2")
; << START OF USER SCRIPT >>
(if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
  (foreach ps  '(("d-prot-500ps" nil 1) ("d-prot Xerox510" t 5) ("d-prot-800" nil 1) ("small_copy" nil 3) ("HP LASER 11x17" nil 1))
    (setq *ptdebug* t)                                                                           
    (sub_plottabs (list  (car ps)  (nth 2 ps) "Tab" (cadr ps) nil t t "~" nil nil t T "" "*"))                                                                         
  )
  (princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
close
Y
_QSAVE

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Plottabs help
« Reply #28 on: January 19, 2007, 05:05:36 PM »
dan,
This should work, It does on my end.
You have added the QSAVE after the drawing is already closed. I did not use QSAVE as it caused problems with
ACAD2000 which I am testing with. I saw no reason to save the drawings as you are not modifying them.
So try to remove the QSAVE & see it it works.

Code: [Select]
; ***************************************************************
;  HURRICANE 6.5.13 - SCRIPT CREATED 1/19/2007 : 4:28:02 PM
; ***************************************************************
_OPEN
"d:\Drawings\M-2630EM ONE CHRISTINA CRESCENT\COMPLETE SUBMISSION\DETAILS.dwg"
; << START OF PRE-USERSCRIPT COMMANDS >>
(SETVAR "MODEMACRO" "Drawing 1 of 2")
; << START OF USER SCRIPT >>
(if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
  (foreach ps  '(("d-prot-500ps" nil 1) ("d-prot Xerox510" t 5) ("d-prot-800" nil 1) ("small_copy" nil 3) ("HP LASER 11x17" nil 1))
    (setq *ptdebug* t)                                                                           
    (sub_plottabs (list  (car ps)  (nth 2 ps) "Tab" (cadr ps) nil t t "~" nil nil t T "" "*"))                                                                         
  )
  (princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
close
Y
[color=red]_QSAVE   <----<<<[/color]
_OPEN
"d:\Drawings\M-2464EM\M-2464EF\umdnj elevations.dwg"
; << START OF PRE-USERSCRIPT COMMANDS >>
(SETVAR "MODEMACRO" "Drawing 2 of 2")
; << START OF USER SCRIPT >>
(if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
  (foreach ps  '(("d-prot-500ps" nil 1) ("d-prot Xerox510" t 5) ("d-prot-800" nil 1) ("small_copy" nil 3) ("HP LASER 11x17" nil 1))
    (setq *ptdebug* t)                                                                           
    (sub_plottabs (list  (car ps)  (nth 2 ps) "Tab" (cadr ps) nil t t "~" nil nil t T "" "*"))                                                                         
  )
  (princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
close
Y
[color=red]_QSAVE  <---<<<[/color]
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
Re: Plottabs help
« Reply #29 on: January 19, 2007, 05:33:52 PM »
that's what i thought. my script ends exactly like yours
close
y
but once i produce the batch script it keeps putting the qsave in there. i have been looking at the settings and there are some save options but i do not have it set to save. hmmm how annoying