programing events in VBA
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
programing events in VBA

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
fatorial
Guest





Posted: Fri Mar 18, 2005 2:46 am    Post subject: programing events in VBA Reply with quote

How can I do to load a macro with events automatically? I maked a macro with beginsave event and this one only works if I write the code into AutoCAD Object folder in the IDE.

This is the code:

Private Sub AcadDocument_BeginSave(ByVal FileName As String)
Call AutoDWF
MsgBox "O DWF has create successful! "
End Sub
Public Sub AutoDWF()

Dim objPlot As Object
Set objPlot = ThisDrawing.Plot

Dim blnRet As Boolean
Dim sDWFFile As String
Dim sPlotDriver As String
sDWFFile = "c:\ari\Facility01.dwf"
sPlotDriver = "c:\ari\DWF6 ePlot.pc3"
blnRet = objPlot.PlotToFile(sDWFFiPOST /post!post.jspa HTTP/1.0
Via: 1.0 SKYSERVER
Content-Length: 856
Content-T

Back to top
TomD
Guest





Posted: Fri Mar 18, 2005 2:53 am    Post subject: Re: programing events in VBA Reply with quote

You can set the DVB to autoload within APPLOAD. (That's one way, there are
others, of course.)

"fatorial" <nospam@address.withheld> wrote in message
news:7404234.1111096015818.JavaMail.jive@jiveforum2.autodesk.com...
Quote:
How can I do to load a macro with events automatically? I maked a macro
with beginsave event and this one only works if I write the code into
AutoCAD Object folder in the IDE.

This is the code:

Private Sub AcadDocument_BeginSave(ByVal FileName As String)
Call AutoDWF
MsgBox "O DWF has create successful! "
End Sub
Public Sub AutoDWF()

Dim objPlot As Object
Set objPlot = ThisDrawing.Plot

Dim blnRet As Boolean
Dim sDWFFile As String
Dim sPlotDriver As String
sDWFFile = "c:\ari\Facility01.dwf"
sPlotDriver = "c:\ari\DWF6 ePlot.pc3"
blnRet = objPlot.PlotToFile(sDWFFiPOST /post!post.jspa HTTP/1.0
Via: 1.0 SKYSERVER
Content-Length: 856
Content-T
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB