Howto import or setup Named Page Setups?

Discussion in 'AutoCAD' started by David Allen, Dec 14, 2004.

  1. David Allen

    David Allen Guest

    I have a lisp that set's up my sheets for plotting. How do I name the setup in a program without using the pagesetup
    dialog box?


    David
     
    David Allen, Dec 14, 2004
    #1
  2. David Allen

    MiD-AwE Guest

    If you are using AutoLISP here are two ways that we do it.

    First this one uses a previously created pagesetup named paper prints configured to work with our 11X17 page format.

    (command "-plot" "N" "<LAYOUTNAME>" "PAPER PRINTS" "PRINT_Q.pc3" "N" "Y" "Y")

    This one does the same thing but it doesn't use any previous pagesetup.

    (command "-plot" "Y" "<LAYOUTNAME>" "PRINT_Q.pc3" "Tabloid" "I" "Landscape" "N" "E" "" "CENTER" "Y" "custom.CTB" "YES" "NO" "NO" "NO" "NO" "NO" "YES")

    I had to type -plot at the command line and just scribble down the settings as I went to get these originally so that may be a good test for you too. Hope this helps.
     
    MiD-AwE, Dec 14, 2004
    #2
  3. Does this get you where you need to be or do you
    have a more specific question?

    (vla-add <plotConfigurationCollection> "MyName")
     
    Jason Piercey, Dec 14, 2004
    #3
  4. David Allen

    David Allen Guest

    but where do you give it your name? The first example trys to load the named setup paper prints. It has to exist, I
    get the error not found.

    The 2nd example does not save a named setup.

    MiD-AwE <>
    |>If you are using AutoLISP here are two ways that we do it.
    |>
    |>First this one uses a previously created pagesetup named paper prints configured to work with our 11X17 page format.
    |>
    |>(command "-plot" "N" "<LAYOUTNAME>" "PAPER PRINTS" "PRINT_Q.pc3" "N" "Y" "Y")
    |>
    |>This one does the same thing but it doesn't use any previous pagesetup.
    |>
    |>(command "-plot" "Y" "<LAYOUTNAME>" "PRINT_Q.pc3" "Tabloid" "I" "Landscape" "N" "E" "" "CENTER" "Y" "custom.CTB" "YES" "NO" "NO" "NO" "NO" "NO" "YES")
    |>
    |>I had to type -plot at the command line and just scribble down the settings as I went to get these originally so that may be a good test for you too. Hope this helps.


    David
     
    David Allen, Dec 16, 2004
    #4
  5. David Allen

    David Allen Guest

    sorry no I don't get it

    "Jason Piercey" <nomail>
    |>Does this get you where you need to be or do you
    |>have a more specific question?
    |>
    |>(vla-add <plotConfigurationCollection> "MyName")


    David
     
    David Allen, Dec 16, 2004
    #5
  6. David,

    What exactly are you trying to do?

    Are you trying to import a plotconfiguration(s) from
    another document?

    Are you trying to setup and name a plotconfiguration
    on the fly in the current document?

    Or both/neither?
     
    Jason Piercey, Dec 16, 2004
    #6
  7. David, setup the page setups in your template files, then use Visual LISP to
    import them.

    --
    R. Robert Bell


    but where do you give it your name? The first example trys to load the
    named setup paper prints. It has to exist, I
    get the error not found.

    The 2nd example does not save a named setup.
     
    R. Robert Bell, Dec 17, 2004
    #7
  8. Sounds like he want to *create* the named page setup on the fly.

    If that is so David, you can use the ActiveX object model. Just as easy IMHO
    to do it the "old-fashioned way" in the templates.

    --
    R. Robert Bell


    "Jason Piercey" <Jason AT atreng DOT com> wrote in message
    David,

    What exactly are you trying to do?

    Are you trying to import a plotconfiguration(s) from
    another document?

    Are you trying to setup and name a plotconfiguration
    on the fly in the current document?

    Or both/neither?
     
    R. Robert Bell, Dec 17, 2004
    #8
  9. That is what I thought, but the subject implies both.

    FWIW, I use the template route.
     
    Jason Piercey, Dec 17, 2004
    #9
  10. Glad I'm not alone! ;^)

    --
    R. Robert Bell


    "Jason Piercey" <Jason AT atreng DOT com> wrote in message
    That is what I thought, but the subject implies both.

    FWIW, I use the template route.
     
    R. Robert Bell, Dec 17, 2004
    #10
  11. David Allen

    jlspartz Guest

    I don't understand exactly what you are trying to accomplish, but this is the way that I import page setups:

    (defun C:plotblackps ()
    (setvar "cmdecho" 0)
    (setvar "filedia" 0)
    (COMMAND "psetupin" "PRA Page Setups - Plotfile-Black.dwt" "*")
    (setvar "filedia" 1)
    (setvar "cmdecho" 1)
    (princ "\n\n*** Plotfile Black & White Page Setups Imported *** \n\n")
    (princ)
    )

    I made a file called PRA Page Setups - Plotfile-Black.dwt with just my page setups in it and if you see in the code I put the * as the next command which imports all page setups from that file, which you can replace and just type in the name of the page setup if you just want to import one specific page setup out of that file.

    Hope it helps

    Jamie
     
    jlspartz, Dec 17, 2004
    #11
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.