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
|
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
Have you considered the performance issues? I save every few minutes. I would hate this.
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?
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
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
Hello Could you please send me the link to this article.
I cant seem to find it on the website.
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.
Originally Posted by barnesd
My bad! Wasn't posted til Saturday: http://tinyurl.com/4cxx9
Originally Posted by waynes.61209
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.
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