Author Topic: Plottabs Help Revisited  (Read 5362 times)

0 Members and 2 Guests are viewing this topic.

ELOQUINTET

  • Guest
Re: Plottabs Help Revisited
« Reply #15 on: June 11, 2007, 12:18:58 PM »
cab at first i was trying to run a few lisp routines we have for importing all of the pagesetups from our template after the drawing is opened but that wasn't working so I decided to just load the small copy one into the drawings for testing. i tried running the script with sdi set to 1 several times and it never proceeded to the second drawing. see below: I also tried it with sdi set to 0 and took out the closes and saves with the same results?  :ugly: take a look and see if you see any reason why it didn't work as expected.

Command: '_script
Command: SDI

Enter new value for SDI <0>: 1

Command: OPEN
Really want to discard all changes to drawing? <N> Y

Enter name of drawing to open <D:\Drawings\batch test\batch test 1.dwg>:
"D:\Drawings\batch test\batch test 1.dwg"

Opening an AutoCAD 2004/LT 2004  format file.
Regenerating layout.

Command:

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

   <<ACAD.dvb Loaded>>
   <<AngleConnector.dvb Loaded>>
   <<CommonDialog.dvb Loaded>>
   <<Gatte.dvb Loaded>>
   <<UpdateAttribute.dvb Loaded>>
   <<vm_reflected.dvb Loaded>>
   <<CPS.dvb Loaded>>
AutoCAD menu utilities loaded.
AutoCAD menu utilities loaded.
Command: (if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
(_>   (foreach ps  '(("small_copy" nil 1) ("d-prot Xerox510" 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.
PlotTabs01.14.07 running.
* * * *    S t a r t i n g   t h e   P l o t     * * * *
* * * *    Debug Mode is ON     * * * *
=-=-=-=-=-=-=-=-=-=   DEBUG MODE =-=-=-=-=-=-=-=-=-=-=
  * * * *    Variable Dump     * * * *
-> small_copy [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'
-> 1[Quantity]- number of sets
-> True [SaveLayout]- Always True- Not an option in this version
-> True [CollateSets]- t/nil  Collate plan sets when more than one plotted
-> True [ExcludeTab]- t/nil  Flag to exclude tabs with flag character
-> ~ [ExcludeChr]- "~" Character marker for exclude tabs
-> False [zoom-all]- t/nil  Zoom layout before plotting
-> 0 [config#]- pointer to config name in list, 0= first item
-> Config List [config-list]->
                              Current
                              A1-FX
                              A1-PDF
                              A1-PROT
                              D-prot Xerox510
                              HP LASER 11x17
                              LANDSCAPE
                              LANDSCAPE-PDF
                              LEGAL
                              LEGAL-FAX
                              LEGAL-PDF
                              d-prot-500ps
                              d-prot-800
                              small_copy
-> Tab Name to Plot [tab-list]->
                              D-PROT
                              D-PROT (5)
-> / [Tabs2Plot]-
  * * * *    End Variable Dump     * * * *
=-=-=-=-=-=-=-=-=-=   DEBUG MODE =-=-=-=-=-=-=-=-=-=-=

Plotting layout "D-PROT"...
._-layer
Current layer:  "0"
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock
/stAte]: _state
Enter an option [?/Save/Restore/Edit/Name/Delete/Import/EXport]: _restore
Enter name of layer state to restore or [?]: D-PROT
Unknown layer state name.
Enter name of layer state to restore or [?]:
Enter an option [?/Save/Restore/Edit/Name/Delete/Import/EXport]: Enter an
option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock
/stAte]:
Command:
=-=-=-=-=-=-=-=-=-=   DEBUG MODE =-=-=-=-=-=-=-=-=-=-=
  * * * *    Page Set Up Info   * * * *
->  Config Name  : LASER PRINTER.pc3
->  Style Sheet  : small_copy.ctb
->  CanMed Name  : Letter
->  Center Plot  : :vlax-true
->  Paper Units  : 0
->  Plot Hidden  : :vlax-false
->  Plot Rotate  : 1
->  Plot Type    : 1
->  Plot Origin  : (13.208 0.0)
->  Plot W-Styles: :vlax-true
->  Scale Lin Wts: :vlax-false
->  Std Scale    : :vlax-true
->  window state : 3
->  path         : C:\Program Files\AutoCAD 2008
* * * *    End Page Set Up Info   * * * *

=-=-=-=-=-=-=-=-=-=   DEBUG MODE =-=-=-=-=-=-=-=-=-=-=
Effective plotting area:  7.00 wide by 10.50 high

Plotting viewport 1.

Plotting layout "D-PROT (5)"...
._-layer
Current layer:  "0"
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock
/stAte]: _state
Enter an option [?/Save/Restore/Edit/Name/Delete/Import/EXport]: _restore
Enter name of layer state to restore or [?]: D-PROT (5)
Unknown layer state name.
Enter name of layer state to restore or [?]:
Enter an option [?/Save/Restore/Edit/Name/Delete/Import/EXport]: Enter an
option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock
/stAte]:
Command:
=-=-=-=-=-=-=-=-=-=   DEBUG MODE =-=-=-=-=-=-=-=-=-=-=
  * * * *    Page Set Up Info   * * * *
->  Config Name  : LASER PRINTER.pc3
->  Style Sheet  : small_copy.ctb
->  CanMed Name  : Letter
->  Center Plot  : :vlax-true
->  Paper Units  : 0
->  Plot Hidden  : :vlax-false
->  Plot Rotate  : 1
->  Plot Type    : 1
->  Plot Origin  : (13.208 0.0)
->  Plot W-Styles: :vlax-true
->  Scale Lin Wts: :vlax-false
->  Std Scale    : :vlax-true
->  window state : 3
->  path         : C:\Program Files\AutoCAD 2008
* * * *    End Page Set Up Info   * * * *

=-=-=-=-=-=-=-=-=-=   DEBUG MODE =-=-=-=-=-=-=-=-=-=-=
Regenerating layout.
Effective plotting area:  7.00 wide by 10.50 high

Plotting viewport 1.


****   Plot Sets Complete   ****
1 copy of 2 layouts = 2 sheets plotted.

PlotTabs01.14.07 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 Xerox510 [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'
-> 1[Quantity]- number of sets
-> True [SaveLayout]- Always True- Not an option in this version
-> True [CollateSets]- t/nil  Collate plan sets when more than one plotted
-> True [ExcludeTab]- t/nil  Flag to exclude tabs with flag character
-> ~ [ExcludeChr]- "~" Character marker for exclude tabs
-> False [zoom-all]- t/nil  Zoom layout before plotting
-> 0 [config#]- pointer to config name in list, 0= first item
-> Config List [config-list]->
                              Current
                              A1-FX
                              A1-PDF
                              A1-PROT
                              D-prot Xerox510
                              HP LASER 11x17
                              LANDSCAPE
                              LANDSCAPE-PDF
                              LEGAL
                              LEGAL-FAX
                              LEGAL-PDF
                              d-prot-500ps
                              d-prot-800
                              small_copy
-> Tab Name to Plot [tab-list]->
                              D-PROT
                              D-PROT (5)
-> / [Tabs2Plot]-
  * * * *    End Variable Dump     * * * *
=-=-=-=-=-=-=-=-=-=   DEBUG MODE =-=-=-=-=-=-=-=-=-=-=

Plotting layout "D-PROT"...
._-layer
Current layer:  "0"
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock
/stAte]: _state
Enter an option [?/Save/Restore/Edit/Name/Delete/Import/EXport]: _restore
Enter name of layer state to restore or [?]: D-PROT
Unknown layer state name.
Enter name of layer state to restore or [?]:
Enter an option [?/Save/Restore/Edit/Name/Delete/Import/EXport]: Enter an
option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock
/stAte]:
Command:
=-=-=-=-=-=-=-=-=-=   DEBUG MODE =-=-=-=-=-=-=-=-=-=-=
  * * * *    Page Set Up Info   * * * *
->  Config Name  : Xerox 510.pc3
->  Style Sheet  : Xerox_510.ctb
->  CanMed Name  : User267
->  Center Plot  : :vlax-false
->  Paper Units  : 0
->  Plot Hidden  : :vlax-false
->  Plot Rotate  : 0
->  Plot Type    : 1
->  Plot Origin  : (16.51 7.40613)
->  Plot W-Styles: :vlax-true
->  Scale Lin Wts: :vlax-false
->  Std Scale    : :vlax-true
->  window state : 3
->  path         : C:\Program Files\AutoCAD 2008
* * * *    End Page Set Up Info   * * * *

=-=-=-=-=-=-=-=-=-=   DEBUG MODE =-=-=-=-=-=-=-=-=-=-=
Regenerating layout.
Effective plotting area:  34.50 wide by 23.00 high

Plotting viewport 1.

Plotting layout "D-PROT (5)"...
._-layer
Current layer:  "0"
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock
/stAte]: _state
Enter an option [?/Save/Restore/Edit/Name/Delete/Import/EXport]: _restore
Enter name of layer state to restore or [?]: D-PROT (5)
Unknown layer state name.
Enter name of layer state to restore or [?]:
Enter an option [?/Save/Restore/Edit/Name/Delete/Import/EXport]: Enter an
option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock
/stAte]:
Command:
=-=-=-=-=-=-=-=-=-=   DEBUG MODE =-=-=-=-=-=-=-=-=-=-=
  * * * *    Page Set Up Info   * * * *
->  Config Name  : Xerox 510.pc3
->  Style Sheet  : Xerox_510.ctb
->  CanMed Name  : User267
->  Center Plot  : :vlax-false
->  Paper Units  : 0
->  Plot Hidden  : :vlax-false
->  Plot Rotate  : 0
->  Plot Type    : 1
->  Plot Origin  : (16.51 7.40613)
->  Plot W-Styles: :vlax-true
->  Scale Lin Wts: :vlax-false
->  Std Scale    : :vlax-true
->  window state : 3
->  path         : C:\Program Files\AutoCAD 2008
* * * *    End Page Set Up Info   * * * *

=-=-=-=-=-=-=-=-=-=   DEBUG MODE =-=-=-=-=-=-=-=-=-=-=
Regenerating layout.
Effective plotting area:  34.50 wide by 23.00 high

Plotting viewport 1.


****   Plot Sets Complete   ****
1 copy of 2 layouts = 2 sheets plotted.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Plottabs Help Revisited
« Reply #16 on: June 11, 2007, 01:31:44 PM »
Dan, I don't think this is the problem but change to this and use sdi = 0 and try again.
All I did here was stop the use of Layer States based on Tab Names.
Code: [Select]
OPEN
 "D:\Drawings\batch test\batch test 1.dwg"
(if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
  (foreach ps  '(("d-prot Xerox510" t 1) ("small_copy" nil 1))   
    (setq *ptdebug* t)                                                       
    (sub_plottabs (list  (car ps)  (nth 2 ps) "Tab" (cadr ps) nil t t "~" nil nil t nil "" "*"))                                                                         
  )
  (princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
close
Y
Open
"D:\Drawings\batch test\batch test 2.dwg"
(if (or sub_plottabs (/= (load "plottabs.lsp" "fail") "fail"))
  (foreach ps  '(("d-prot Xerox510" t 1) ("small_copy" nil 1)) 
    (setq *ptdebug* t)                                                      
    (sub_plottabs (list  (car ps)  (nth 2 ps) "Tab" (cadr ps) nil t t "~" nil nil t nil "" "*"))                                                                         
  )
  (princ "\nCould not load PlotTabs.lsp or plotHelper.lsp")
)
close
Y
« Last Edit: June 11, 2007, 01:33:01 PM 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 Revisited
« Reply #17 on: June 11, 2007, 01:54:53 PM »
CAB,

Have I ever told you that you are a genius, It worked. We don't use any layer states here so I guess it was halting it. I almost can't believe it finally worked. I am saving this as a working version and trying to incorporate the loading of the pagesetups and see if I can get it working through hurricane. I'll let you know how it goes. Which bit is for layer filters, just so I know. Thanks a bunch for your help figuring this out. I suppose I've helped you discover a glitch through this debuggin as well  :wink:

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Plottabs Help Revisited
« Reply #18 on: June 11, 2007, 03:54:16 PM »
Oh, good.
The problem is when there are no layer states & the switch is on. The command fails. I am working on a revision to fix that. In the meantime keep the setlaystate switch off when no layer states are used.

Code: [Select]
      (sub_plottabs
          ;;  Option variables passed to this routine in this order
          '("Current" ;  plot-config    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
            nil       ;  revorder       t/nil Reverse the order of plots
            t         ;  savelayout     Always set to True- Not an option in this version
            nil       ;  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 
            [color=green]t         ;  PlotAllTabs    Ignore the Pick List of Tabs[/color]
            [color=red]nil        ;  setlaystate    ACAD>2000 set layer state by name of tab before plotting[/color]
            ""        ;  MyPath         Path for 'Plot To File'
            list      ;  Tabs2Plot      List of tab names  ("Sheet 1" "Sheet 2" "Sheet*") wild card ok
           )
        ) ; end sub_plottabs
Also keep PlotAllTabs True unless you are specifying the tab names.
« Last Edit: June 11, 2007, 03:58:57 PM 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.