TheSwamp

CAD Forums => CAD General => Topic started by: sestes on July 08, 2004, 12:08:09 PM

Title: Page Setup import
Post by: sestes on July 08, 2004, 12:08:09 PM
I'm looking for a way to import a list of page setups from a template on my network.  Here's the scenario, I get floor plans on a daily basis and I need to print them out for mark ups before I set everything up as my own (ie title block, job info).  I would like to just load the page set up(s) from a menu rather than going through the _.pagesetup dialog box and importing manually.   I have tried to write a script but I cant seem to get pass the dialog box.  I have tried changing filedia to 0, but that didn't do it.  Any help would be appreciated.
Title: Page Setup import
Post by: M-dub on July 08, 2004, 12:16:27 PM
^C^C.-PSETUPIN "PageSetups.dwg" "*" PLOT;

Try that!
Title: Page Setup import
Post by: Dommy2Hotty on July 08, 2004, 12:18:49 PM
Create a drawing will the page setups you need, then use the one of the buttons below.  The first one will first delete all the page setups by running the LISP file below, then it adds all the setups from the file I made called "PageSetups."  One press of the button will do it all...

To delete then import:
^C^CDel_Pagesetups;^C^C.-PSETUPIN "PageSetups.dwg" "*"

To just import:
C^C.-PSETUPIN "PageSetups.dwg" "*"

This is the code to delete all page setups:
Code: [Select]
;;  Function to delete all user plot set ups
(defun c:Del_Pagesetups (/ curdwg pslayout x)
  (vl-load-com)
  (setq
    curdwg   (vla-get-ActiveDocument (vlax-get-Acad-Object))
    pslayout (vla-get-Layout (vla-get-PaperSpace curdwg))
  ) ;_ end of setq
  ;; Call RefreshPlotDeviceInfo before GetPlotDeviceNames
  (vla-RefreshPlotDeviceInfo pslayout)
  (vlax-for x (vla-get-Plotconfigurations curdwg)
    (vla-delete x)
  ) ;_ end of vlax-for
)               ; End Plot_config_list
(c:Del_Pagesetups)
Title: Page Setup import
Post by: sestes on July 08, 2004, 12:25:23 PM
Awsome!!  Works like a charm.  Thanks to both of you.  This forum never lets me down.   :D
Title: Page Setup import
Post by: Andrea on July 14, 2004, 12:25:55 PM
Quote from: sestes
Awsome!!  Works like a charm.  Thanks to both of you.  This forum never lets me down.   :D



yes, !! this is very cool....

but not working on 2005...!!   :shock:
Title: Page Setup import
Post by: Andrea on July 14, 2004, 02:55:26 PM
also.. i can find a way to execute....        .-PSETUPIN
without having the dialog box...!!?

 :?
Title: Page Setup import
Post by: ronjonp on July 14, 2004, 04:57:44 PM
Quote
also.. i can find a way to execute.... .-PSETUPIN
without having the dialog box...!!?


Set filedia to 0.