Results 1 to 6 of 6

Excel Macro Launch AutoCAD on Completion

Threaded View

  1. #3
    Registered User
    Join Date
    01-12-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, 2003
    Posts
    84

    Re: Excel Macro Launch AutoCAD on Completion

    Thanks for your reply. I think I follow this but let me ask this question first.

    I have found a way to run AutoCAD from the macro using the SHELL command. But I'm not really comfortable with this. If I recall correctly, using SHELL from a BASIC program does not give up control from the BASIC code until the other application is completed and closed. I'm afraid of users doing something like shutting down Excel before control returns to the macro. Is this a valid concern with today's environment or am I stuck back in the 1980's with my BASIC skills.

    OK - So in the Excel program under Tools > References I chose AutoCAD 2010 Type Library and only that one. There are three other AutoCAD references listed in this menu:

    AutoCAD Focus Control for VBA Type Library
    AutoCAD Map MPolygon Type Library
    AutoCADObjectDBX Common 18.0 Type Library

    I have left those items unchecked. But would there be a need for any others?

    When AutoCAD loads I not only want this particular drawing file to open but some other command line switches can be included (similar to using the SHELL method above) which start certain things happening within AutoCAD as well. I'm wondering if I change the line:

    strDrawing = "c:\Test.dwg"
    to be like this:

    strDrawing = "c:\Test.dwg /b startup"
    will Windows understand this as if I had done the AutoCAD command from the command line including the actutal ACAD.exe file itself. I'm testing some more with this now but any advice would be appreciated. And thank you again.
    Last edited by Vladamir; 01-13-2012 at 09:38 AM.
    Wish I didn't know now what I didn't know then.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1