I think I'm having trouble using
SendStringToExecute while it's being implemented within
DocumentManager.DocumentActivated event block. The problem was
described down the NG many times, but I still couldn't find working
solution to it. Basically, what happens is that while in DocumentActivated
SendStringToExecute mostly (blah) returns eNoDocument since command
line is not fully ready to accept commands (blah, blah).
I'm adding a DocumentActivated handler
during sole start of ACAD, via managed library within "Applications"
registry key (LoadReason = 2, meaning "start as ACAD starts"). It doesn't grab
the first opened drawing, so I'm firing the delegate manually to cover that
[Tested on: Windows 2000 SP4, AutoCAD 2006, .NET
2.0, VS.NET 2005]
Hi, Maksim Sestic!
Did you tried other methods?
Some of them is decribed here: http://through-the-interface.typepad.com/through_the_interface/2006/08/techniques_for_.html
Its can be using in .NET application also with help of P/Invoke.
A nice compilation, thanks Kean! Since I
already tried every proposed strategy, I resorted back to good old acadoc.lsp
:-) which does the trick. I had luck since ACAD traverses Support paths for
acaddoc.lsp _after_ everything settles down (profile setting, etc.). So, even if
wrong profile is active during startup, I'm creating/switching it
via managed loader and acaddoc.lsp automatically gets executed as
It's even possible to _create_ customized
acaddoc.lsp during initialization phase, and that's exactly what I was looking
for since my InstallShield installation procedure gathers necessary