Results 1 to 8 of 8

Thread: Saving & Printing in AutoCAD

  1. #1
    Registered
    Join Date
    Sep 2005
    Location
    USA
    Posts
    16
    Downloads
    0
    Uploads
    0

    Saving & Printing in AutoCAD

    I'm looking to create a routine in AutoLISP or VBA in AutoCAD that will allow me to save a file and then print it, with one click of the mouse or with one keystroke. When I save certain drawings, I need to create a duplicate PDF for others to view, and I think it would be easier to make AutoCAD automatically prompt me to print immediately after saving. Ideally, I'd like to just click Save in a toolbar, save the file to its destination, and then have the print menu pop up immediately afterwards. Or something to that effect. Is this something that can be done?


  2. #2
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,306
    Downloads
    0
    Uploads
    0
    Probably easier in AutoLisp than VBA. Shouldn't be too hard if you know AutoLisp. The save part is very easy, just use (command "save" "") If you haven't already saved it, it will be saved as Drawing1.dwg.

    If you're in a paperspace layout with everything all set up to plot, the following should work

    (Command "plot" "" "" "" "" "" "" "" "" )
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  3. #3
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,306
    Downloads
    0
    Uploads
    0
    In my previous plot example, the "" are "enter" in responce to AutoCAD prompts.

    If you enter into the command line, (command "plot"), you'll see the prompts and you can replace the "" with the appropriate responses.
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  4. #4
    Registered
    Join Date
    Sep 2005
    Location
    USA
    Posts
    16
    Downloads
    0
    Uploads
    0
    Thanks a lot, it worked. Here's what I entered in the text file:

    (command "save" "~" "plot" "" "" "" "PDF" "" "" "")

    This way I can save the file where I want, and name it what I want, and then my PDF writer is automatically chosen as the printer.

    I have one other question: Is there a quicker way to execute this besides typing 'appload'? Such as assigning the appload command to a button in a toolbar?


  • #5
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,306
    Downloads
    0
    Uploads
    0
    In the button properties, under macro associated with this button, just enter the following:
    ^C^C (command "save" "~" "plot" "" "" "" "PDF" "" "" "")
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  • #6
    Registered
    Join Date
    Sep 2005
    Location
    USA
    Posts
    16
    Downloads
    0
    Uploads
    0
    It worked! Thanks again for the help.


  • #7
    *Registered User*
    Join Date
    Sep 2004
    Location
    USA
    Posts
    239
    Downloads
    0
    Uploads
    0
    Hi Gerry,

    I have read a lot of your posts/help on Autocad questions and I have to say you really know the insides Autocad very well.

    I have been using Autocad for 20 years and did a lot of the lisp writing and custom menus early on in my career, but I have lost my proficiency and knowledge over time since I am forbidden at work to do those types of things anymore. I guess they think I get payed too much for doing Cad customization. :frown:

    At least I know where to go if I have an AutoCAD question. BTW: What version are you using?

    Chris


  • #8
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,306
    Downloads
    0
    Uploads
    0
    I'm self taught, and have been learning for about 7 years now. I like to think I know quite a bit, but I still learn new things all the time. I use mostly 2002, but will be switching to 2006 after the first of the year when I get a faster computer.
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  • Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.