.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SendStringToExecute during DocumentActivated... revisited

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
275 Views, 2 Replies

SendStringToExecute during DocumentActivated... revisited


Hi all,

 

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
one.

 

[Tested on: Windows 2000 SP4, AutoCAD 2006, .NET
2.0, VS.NET 2005]

 

Regards,

Maksim Sestic
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

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.

Best Regards,
Alexander Rivilis.
Message 3 of 3
Anonymous
in reply to: Anonymous


Hi Alexander,

 

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
planned.

 

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
customization data.

 

Regards,

Maksim Sestic

 

 

Hi, Maksim Sestic!
Did you
tried other methods?
Some of them is decribed here:

href="http://through-the-interface.typepad.com/through_the_interface/2006/08/techniques_for_.html">
...


face=Verdana size=2>Its can be using in .NET application also with help of
P/Invoke.

Best Regards,
Alexander Rivilis.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost