See the top rated post in this thread. Click here

Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Creating a DWF automatically on save

  1. #1
    Member
    Join Date
    2004-09
    Posts
    10
    Login to Give a bone
    0

    Default Creating a DWF automatically on save

    Hello

    Is there a way in VBA that when the user saves his AutoCAD work I can automatically also save a DWF file in the background?

    Thanks in Advance

    Daniel

  2. #2
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Creating a DWF automatically on save

    Have you considered the performance issues? I save every few minutes. I would hate this.

  3. #3
    Member
    Join Date
    2004-09
    Posts
    10
    Login to Give a bone
    0

    Default Re: Creating a DWF automatically on save

    I suppose I could do it when the user closes the autoCAD.

    I first check that they have saved and then create a dwf.

    Do you no if it is actually possible to do in VBA code?

  4. #4
    Member
    Join Date
    2002-02
    Location
    Saskatoon, SK Canada
    Posts
    23
    Login to Give a bone
    0

    Default Re: Creating a DWF automatically on save

    Hello barnesd.

    Seeing how a DWF is created through a simple plot procedure, yes, you can generate a DWF from VBA...

    Instead of firing this when AutoCAD closes or on a Save event... you might want to try firing it when the DWG closes...

    Hope this helps
    Warren M

  5. #5
    100 Club mtuersley's Avatar
    Join Date
    2001-12
    Posts
    122
    Login to Give a bone
    0

    Default Re: Creating a DWF automatically on save

    Unless he wants a multipage DWF, then he'd need to use SendCommand and access the -Publish command. For doing that, read my online column this month @ cadalyst.com

  6. #6
    Member
    Join Date
    2004-09
    Posts
    10
    Login to Give a bone
    0

    Default Re: Creating a DWF automatically on save

    Hello Could you please send me the link to this article.

    I cant seem to find it on the website.

  7. #7
    Member
    Join Date
    2003-11
    Location
    Elk River, MN
    Posts
    17
    Login to Give a bone
    0

    Default Re: Creating a DWF automatically on save

    Create a 'new' save button for this purpose. You could do this with a toolbar button and a couple of simple lines of AutoLISP.

    Start by adding a page set-up in your template drawing called your.dwf, using a .dwf plot configuration.
    Next, make a button. the dwf portion could look something like this-

    (command "-plot" "N" "" "your.dwf" "" "" "" "")

    I'm sure there's plenty of other ways. . Simple to sophisticated.



  8. #8
    100 Club mtuersley's Avatar
    Join Date
    2001-12
    Posts
    122
    Login to Give a bone
    0

    Default Re: Creating a DWF automatically on save

    Quote Originally Posted by barnesd
    Hello Could you please send me the link to this article.

    I cant seem to find it on the website.

    My bad! Wasn't posted til Saturday: http://tinyurl.com/4cxx9

  9. #9
    100 Club mtuersley's Avatar
    Join Date
    2001-12
    Posts
    122
    Login to Give a bone
    0

    Default Re: Creating a DWF automatically on save

    Quote Originally Posted by waynes.61209
    Create a 'new' save button for this purpose. You could do this with a toolbar button and a couple of simple lines of AutoLISP.

    Start by adding a page set-up in your template drawing called your.dwf, using a .dwf plot configuration.
    Next, make a button. the dwf portion could look something like this-

    (command "-plot" "N" "" "your.dwf" "" "" "" "")

    I'm sure there's plenty of other ways. . Simple to sophisticated.



    While not entirely inaccurate, how does that help answer Daniel's question - AUTOMATICALLY creating a DWF? If you're going to post an answer, at least make it complete:

    (command "-plot" "n" "whatever_layout" "" "DWF6 ePlot" "whatever.dwf" "n" "y"
    "_qsave")

    Here there is no need to do anything in the template and it saves when done, which was part of the original question. There are 2 problems with this solution though:

    1. Daniel never states whether this is for him or others
    2. Nor does he state if the layout name is consistant

    If its for him, its up to him to click the button. If he needs others to do it, he's way better of trapping an event. If he has different layouts in each drawing, there's no way to automate it unless you do a bit more code.

  10. #10
    Member
    Join Date
    2004-09
    Posts
    10
    Login to Give a bone
    0

    Default Re: Creating a DWF automatically on save

    This bit of code is not for me, It is something we wish to install on other machines as well. And the name will be different everytime, So we somehow need to grab the dwg name and create a dwf with this name.

    I wish to do this code in VBA within AutoCAD. Do you think this will be possible?

    Daniel

Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 2011-10-24, 03:45 PM
  2. 2012: Save to earlier version automatically
    By andrewp in forum AutoCAD General
    Replies: 8
    Last Post: 2011-08-03, 12:58 PM
  3. Creating acaddoc.lsp automatically
    By harilalmn in forum AutoCAD General
    Replies: 1
    Last Post: 2010-11-26, 08:43 AM
  4. Creating Shortcut in OPEN/SAVE dialog box
    By Dhanjeet in forum Revit Architecture - Tips & Tricks
    Replies: 3
    Last Post: 2006-03-08, 10:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •