VBSCRIPT

Discussion in 'AutoCAD' started by pfabio, Jan 18, 2005.

  1. pfabio

    pfabio Guest

    I have a vbscript program and I want launch AutoCAD. It is possible? Have you a example? Tanks
     
    pfabio, Jan 18, 2005
    #1
  2. pfabio

    Gordon Price Guest

    Do you want to just launch AutoCAD, or drive it programatically. To just
    launch, the best approach I have found is to use the WSHShell.Run method to
    run a LNK file that launches AutoCAD. You can proogramatically change
    startup folders and profiles before you run. Or, if you want to actually
    drive Acad programatically, you can use this code...

    Dim objAcadApp
    Set objAcadApp = WScript.CreateObject("Autocad.Application.16")
    objAcadApp.Visible = False
    objAcadApp.Quit

    Both approaches work when using VBScript in WindowsScriptHost. I don't think
    either would work using VBScript in a web page, tho' you might be able to
    use the WSH Shell as an object in an HTA. I am not sure, as I have not tried
    that yet.

    Best,
    Gordon
     
    Gordon Price, Jan 18, 2005
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
Loading...