User Defined Page Setups

Discussion in 'AutoCAD' started by Hans, Oct 27, 2004.

  1. Hans

    Hans Guest

    Hi All of you,

    I'd like to make a lisp that removes all User Defined Page Setups from the
    dwg and imports new ones from an other dwg. Wich sysvars and what methods
    would you advise?

    Thanks,

    Hans
     
    Hans, Oct 27, 2004
    #1
  2. Hans

    Dommy2Hotty Guest

    Save this to a LISP file named Del_Pagesetups.lsp
    Code:
    ;;;====================================================================;
    ;;;                     Del_Pagesetups.lsp                             ;
    ;;;    Received from:    Charles Alan Butler                           ;
    ;;;                                            ;
    ;;;====================================================================;
    
    ;;  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
    Use the following for a button to do this all...make sure you make a drawing with all your page setups, and if you use a different dwg name, edit the following code...
    Code:
    (if (not c:Del_Pagesetups)(load "Del_Pagesetups"));Del_Pagesetups;.-PSETUPIN "PageSetups.dwg" "*";
     
    Dommy2Hotty, Oct 27, 2004
    #2
  3. Hans

    Hans Guest

    Hi Dommy2Hotty,

    That's not inconvenient at all.
    My tinkering is practicly unnecessary.
    Thanks,

    Hans
     
    Hans, Oct 27, 2004
    #3
  4. Hans

    Dommy2Hotty Guest

    So it's what you were looking for, correct?
     
    Dommy2Hotty, Oct 27, 2004
    #4
  5. Hans

    Hans Guest

    Yeah, really nice, thank you very much.

    Hans
     
    Hans, Oct 28, 2004
    #5
  6. Hans

    Dommy2Hotty Guest

    Glad I could help...that is courtesy of CAB at TheSwamp
     
    Dommy2Hotty, Oct 28, 2004
    #6
  7. Hans

    Hans Guest

    I'l check it out
     
    Hans, Oct 29, 2004
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.