Quick way to import Named Page Setups (and over write)?

Discussion in 'AutoCAD' started by Gordon Price, Feb 16, 2004.

  1. Gordon Price

    Gordon Price Guest

    I know you can manually go in and import, but gah what a pain. Anyone know
    of a quick way (code or otherwise) to imprt a specific named page setup from
    a specific drawing, and over write the setup of the same name.

    Thanks,
    Gordon
     
    Gordon Price, Feb 16, 2004
    #1
  2. AUGI's Exchange has a way to do that. It was VBA written by Ed Jobe.

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    I know you can manually go in and import, but gah what a pain. Anyone know
    of a quick way (code or otherwise) to imprt a specific named page setup from
    a specific drawing, and over write the setup of the same name.

    Thanks,
    Gordon
     
    R. Robert Bell, Feb 16, 2004
    #2
  3. Gordon Price

    A Diaz Guest

    If you define a drawing containing all your page setup and you put it on the
    AutoCAD search path, you could use a simple code like this:

    (command
    "._-PSETUPIN"
    "PATH TO YOUR DRAWING CONTAINING YOUR PAGE SETUP"
    "NAME OF YOUR PAGE SETUP"
    )
     
    A Diaz, Feb 17, 2004
    #3
  4. Gordon Price

    Tom Smith Guest

    of a quick way (code or otherwise) to imprt a specific named page setup
    from a specific drawing

    We use a limited number of page setups, all of which are kept in a template
    file. Our new drawings have page setups, because they're in our new template
    files.

    To import setups into a older drawing which lacks them, we have a toolbar
    button that runs (command "-psetupin" <pagesetupfilename> "*"). You could
    replace the * with the name of a specific setup. Set expert to 2 to
    eliminate overwrite prompts.

    But in our case, nobody wants to fiddle with importing individual setups
    anyway -- they'd rather hit one button, get everything, and be done with it.
     
    Tom Smith, Feb 17, 2004
    #4
  5. Gordon Price

    CAB2k Guest

    ^C^C.-PSETUPIN "PageSetups.dwg" "*"

    Works for me..
     
    CAB2k, Feb 17, 2004
    #5
  6. Gordon Price

    Tom Smith Guest

    ^C^C.-PSETUPIN "PageSetups.dwg" "*" Works for me..

    I simplified. The actual button macro is

    ^C^C(importpagesetups);

    For a variety of reasons, I rarely use any menu macro that contains more
    than a word or two -- either a straight Acad command, or a lisp call. In
    this case, the lisp function calls my standard error handler to set an undo
    mark, and save and restore the cmdecho and expert variables, before running
    the command call I quoted earlier. This avoids a lot of ugly gibberish on
    the command line, prevents the overwrite prompts, and ensures that nothing
    weird is left dangling if the user manages to cancel the command. Those
    kinds of things are difficult and cumbersome to translate into script-macro
    language. I'd rather put them in the a lisp and call the lisp. This is in
    part just my preference. I'm more used to thinking lisp than macro-ese.

    Without setting expert=2, the user will be driven bonkers by the overwrite
    prompts.

    Another reason for doing this is the old security/copyright thing. Our
    company menu, in and of itself, won't do anyone any good if it's bootlegged,
    because nearly everything in it is a call to an encrypted lisp. And the lisp
    won't load or run unless certain conditions are true. Looking at my menu,
    all you learn is that it calls (importpagesetups) but you don't know, in any
    detail, what that does. The more interdependent the customizations, the
    difficult it is for bits and pieces to walk out the door.
     
    Tom Smith, Feb 17, 2004
    #6
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.