.NET

Reply
*Maksim Sestic
Message 1 of 3 (136 Views)

SendStringToExecute during DocumentActivated... revisited

136 Views, 2 Replies
08-25-2006 03:18 AM

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
*Alexander Rivilis
Message 2 of 3 (136 Views)

Re: SendStringToExecute during DocumentActivated... revisited

08-25-2006 02:00 PM in reply to: *Maksim Sestic
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.
*Maksim Sestic
Message 3 of 3 (136 Views)

Re: SendStringToExecute during DocumentActivated... revisited

08-28-2006 08:50 AM in reply to: *Maksim Sestic

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.
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.