Jump to content

Open autocad drawing using VBScript/Javascript


Recommended Posts

Posted

Hi,

I want to open autocad drawing from a web browser.

using the below commad acad.exe > /b >.scr

Can we use VBScript/Javascript?

Posted

This HTML code may help you – please take care that is required to use short form (MsDOS 8.3 standard) for the path.

 

<html>
<head>
 <script> 
  function LaunchAutoCAD() 
   {
    ShellObject = new ActiveXObject("WScript.Shell");
    ShellObject.run("C:\\Progra~1\\AutoCAD\\acad.exe D:\\MyDWG\\test.dwg /b ScrToRun");
    return true;
   } 
 </script>
</head>
<body>
 <input type="button" value="Launch AutoCAD" onClick="return LaunchAutoCAD()">
</body>
</html>

 

Regards,

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...