plotting a drawing 10 times

Discussion in 'AutoCAD' started by Laura, Apr 20, 2004.

  1. Laura

    Laura Guest

    I have to plot a lot of single drawing 10 times.



    I've put a macro under a button



    ^C^C-plot;;;;;;;;



    So it plots the current layout. But just one time

    (I'm using AutoCAD 2000(i))



    But I can't find the option of plotting a layout 10 times in the -plot
    dialogue.


    I can push the button 10 times, but because I have a lot of drawings that
    needs plotting this way it's not a very convenient option. But it has to
    spool/calculate every time I push the button.


    In the plotter dialogue you can change the number of copies. But I have to
    do the same action with all the different drawings. I want to know how to
    put the command under a button or put it in a lisp?



    Is "number of copies" a system variable?



    Thanks in advance



    Greetings



    Laura
     
    Laura, Apr 20, 2004
    #1
  2. You can create a lisp file to perform this task.

    type "-PLOT" at the command prompt, then write down all the inputs use you
    to plot the drawing
    Use notepad to create a file in one of the support paths called MyPlot.lsp

    MyPlot.lsp should look similar following (will change based on your plot
    parameters) -
    (command "PLOT" "Y" "Model" "" "Letter" "I" "P" "N" "W" P0 P1 "Fit" "0,0"
    "y" "acad.ctb" "Y" "N" "N" "Y" "Y")

    Please notice the "" after "Model" - this is the default printer, which is
    the only option (that I know of)

    your macro button should contain the following text -
    ^c^c(repeat 10 (load "MyPlot"))

    or to ask how many times to plot
    ^c^c(repeat (getint "\nInput Number of Plots ? ") (load "MyPlot"))
     
    Alan Henderson, Apr 20, 2004
    #2
  3. Following work to plot 10 copies using the previous plot setting from the
    command line:

    (progn
    (command "-plot" "no" "" "previous plot" "" "" "Y" "N")
    (setq plotnr 10)
    (setq ad (vla-get-activedocument (vlax-get-acad-object)))
    (setq plot (vla-get-plot ad))
    (vla-put-NumberOfCopies plot plotnr)
    (vla-PlotToDevice plot)
    )


    --
    Best Regards, Jimmy Bergmark
    CAD and Database Developer Manager at www.pharmadule-emtunga.com
    Take a look at
    JTB FlexReport (FLEXlm report tool) - www.jtbworld.com/jtbflexreport
    SmartPurger (Purges automatically) - www.jtbworld.com/?/smartpurger.htm
    or download some freeware at www.jtbworld.com
    More on AutoCAD 2005;
    www.jtbworld.com/autocad2005.htm
     
    Jimmy Bergmark, Apr 20, 2004
    #3
  4. Laura

    Laura Guest

    Hi Alan,

    This is working, but it "calculates" the plot everytime (10 times). When you
    use the "number of copies" option it just calculates the plot one time.
    So it takes a lot of time to plot them and a lot of memory in the plotter.

    But I've learned something over repeating lispcommands. Thank you.

    laura
     
    Laura, Apr 22, 2004
    #4
  5. Laura

    Laura Guest

    Hi Jimmy,

    I've tried you option, but it only plots the drawing just one time.
    when I chance the commandline to
    (command "-PLOT" "" "" "" "" "" "" "")
    It plots 2 times

    But it "calculates" the plot everytime. When you use the "number of copies"
    option it just calculates the plot one time.
    So it takes a lot of time to plot them and a lot of memory in the plotter.

    laura
     
    Laura, Apr 22, 2004
    #5
  6. The row (command "-plot" "no" "" "previous plot" "" "" "Y" "N") has to be
    customized.
    The syntax can be found by first trying to use the dialog box to plot one
    copy. The run the -PLOT command and do it manually.

    Command: -plot
    Detailed plot configuration? [Yes/No] <No>: n
    Enter a layout name or [?] <Layout>: Layout
    Enter a page setup name <>:
    Enter an output device name or [?] <EMTANX09.pc3>:
    Write the plot to a file [Yes/No] <N>:
    Save changes to page setup [Yes/No]? <N>
    Proceed with plot [Yes/No] <Y>: n

    After that you see how the row should look like.

    (command "-plot" "n" "Layout" "" "EMTANX09.pc3" "n" "n" "n")

    The important part is the last "n" that makes the -plot command not plot.
    Then it's s the code after that that does the plotting and setting the
    number of copies.
    And it will only process once.

    --
    Best Regards, Jimmy Bergmark
    CAD and Database Developer Manager at www.pharmadule-emtunga.com
    Take a look at
    JTB FlexReport (FLEXlm report tool) - www.jtbworld.com/jtbflexreport
    SmartPurger (Purges automatically) - www.jtbworld.com/?/smartpurger.htm
    or download some freeware at www.jtbworld.com
    More on AutoCAD 2005;
    www.jtbworld.com/autocad2005.htm
     
    Jimmy Bergmark, Apr 22, 2004
    #6
  7. Laura

    Laura Guest

    Thanks.

    Going to try that.

    laura

     
    Laura, Apr 22, 2004
    #7
  8. Laura

    CAB2k Guest

    CAB2k, Apr 22, 2004
    #8
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.