Can I launch AutoCAD in ASP

Can I launch AutoCAD in ASP

Anonymous
Not applicable
765 Views
20 Replies
Message 1 of 21

Can I launch AutoCAD in ASP

Anonymous
Not applicable
Hello:
I tried to run some routine in AutoCAD(MDT) from ASP (Active Server
Pages). It took too much time and fail. Is there anyone have been work on
the same situation? If yes, could you give me some advice. Thanks in
advance.
Here is the code in my asp file:
<%
Server.ScriptTimeout = 300
Response.Write "Beging to launch AutoCAD"
dim oacad
set oacad = createobject("AutoCAD.Application")
oacad.visible = true
oacad.loaddvb Server.MapPath("test.dvb")
oacad.runmacro "test.test"
oacad.Unloaddvb "test.dvb"
oacad.quit
set oacad = nothing
Response.Write "Finish AutoCAD Macro Running"
%>

I have been run a similar VBS which work just fine. code is:

dim oacad
set oacad = createobject("AutoCAD.Application")
oacad.visible = true
oacad.loaddvb "f:\mdt projects\mdtwebdb\test.dvb"
oacad.runmacro "test.test"
oacad.Unloaddvb "f:\mdt projects\mdtwebdb\test.dvb"
oacad.quit
set oacad = nothing

Thanks
Wes
0 Likes
766 Views
20 Replies
Replies (20)
Message 21 of 21

Anonymous
Not applicable
Hi Andrew

I tried to put my code in VB rather than in VBA, and it works fine. I can launch, close, open file, toggle the visibilty... I think it comes from the machine, the OS, or from an unclean installation of something. I will have to dig that.
Martin
0 Likes