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:
to be like this:![]()
strDrawing = "c:\Test.dwg"
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.![]()
strDrawing = "c:\Test.dwg /b startup"
Bookmarks