Message 1 of 5
VBA Macro at Startup Hangs AutoCAD

Not applicable
06-11-2003
06:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a macro I am loading at startup that causes AutoCAD to hang under
some pretty odd conditions.
Here are some specifics from my application:
1) I have a macro in a custom dvb file that I want to run every time I open
a new drawing.
2) My desired solution is to run the macro from a LISP routine that already
runs from the acad.ml file. (Part of this is timing, I'm integrating VBA
functionality into a very complex set of LISP routines we are already using
and I'm passing information back and forth right now.) However, I have tried
using S::Startup functions called from Acaddoc2000.lsp, and several other
options mentioned in the newsgroups, they all have the same problem.
3) That problem is that AutoCAD hangs when opening an existing drawing while
a new drawing that was never saved is still open. (e.g. AutoCAD opens with a
blank drawing, I immediately open an existing drawing AutoCAD hangs. If I
close the new drawing first, then open an existing drawing there is no
problem. Also, if I start another new drawing from a template there is also
no problem.
4) I am 99.9% sure that this is because when opening an existing drawing,
AutoCAD closes the unsaved new drawing that was open. However, when starting
another new drawing AutoCAD keeps that unsaved new drawing open.
I am completely at a lost. I can include the code if anybody wants to see
it, but I'm sure it's not my code because it doesn't matter if the macro
even exists or if the macro is empy. Furthermore, as I mentioned it doesn't
seem to matter how I start the macro or from where.
some pretty odd conditions.
Here are some specifics from my application:
1) I have a macro in a custom dvb file that I want to run every time I open
a new drawing.
2) My desired solution is to run the macro from a LISP routine that already
runs from the acad.ml file. (Part of this is timing, I'm integrating VBA
functionality into a very complex set of LISP routines we are already using
and I'm passing information back and forth right now.) However, I have tried
using S::Startup functions called from Acaddoc2000.lsp, and several other
options mentioned in the newsgroups, they all have the same problem.
3) That problem is that AutoCAD hangs when opening an existing drawing while
a new drawing that was never saved is still open. (e.g. AutoCAD opens with a
blank drawing, I immediately open an existing drawing AutoCAD hangs. If I
close the new drawing first, then open an existing drawing there is no
problem. Also, if I start another new drawing from a template there is also
no problem.
4) I am 99.9% sure that this is because when opening an existing drawing,
AutoCAD closes the unsaved new drawing that was open. However, when starting
another new drawing AutoCAD keeps that unsaved new drawing open.
I am completely at a lost. I can include the code if anybody wants to see
it, but I'm sure it's not my code because it doesn't matter if the macro
even exists or if the macro is empy. Furthermore, as I mentioned it doesn't
seem to matter how I start the macro or from where.