Publish Command Causing Automation Error

Publish Command Causing Automation Error

Anonymous
Not applicable
255 Views
1 Reply
Message 1 of 2

Publish Command Causing Automation Error

Anonymous
Not applicable
Wondering what is the best way for a program to run automatically on drawing startup and yet not be made to crash with an

Automation Error
"The object invoked has disconnected from its clients"

when user does a publish command.

Right now I have this program that runs automatically when user opens up a drawing. I did it by triggering the vb executable from acaddoc.lsp.

Essentially it is like a splash screen which reminds the user of some important settings that are particular only to the the drawing at hand.

So when it runs a timer allows it to run for about 4 seconds after which the program ends itself.

This arrangement has worked perfect for about a year now ... but then as of today people started wanting to use the publish command.

What I then found out was that the publish command automatically triggers acaddoc.lsp (which then of course in turn triggers my program) ... my program then tries to grab some information from the drawing in the background while publish displays Publish Job Progress dialog box with its 2 parallel progress bar... showing the publishing process status so far...

A few seconds after above mentioned process has started all of a sudden my program crashes with a message saying Automation Error "The object invoked has disconnected from its clients".

The only clue I have is from the command line and from observing the drawing from where I am calling the publish command. I can see that it is opening another drawing from inside the current drawing from another folder while it processes the layouts which explains why the acaddoc.lsp is called.

I do not know what happens next, except that somehow that other drawing which was opened from a different folder seems to have closed down ... which would then explain the Automation Error disconnected from client thing.

Now I have to deal with it and the only way I can think of and I am not 100% sure if it will work is to have an event driven thing that will automatically close my program if a drawing closes for any reason at all.

Someone with more experience would be able to advise me if that is the best way to do it .... if it would work (if it wont work then I'd rather not try it of course and just explore some other more promising ways hopefully less clunky)...

I am looking at the command line and it seems next to impossible grabbing the command prompt history from all the flashing screens from the "other drawing" ... so there's a lot of unknowns only imagination is filling it up right now like for example, I really havent seen the close command being issued but I am imagining it is called somewhere because that "other drawing" closes itself automatically

I can start trying with what I know and imagine but everywhere I turn is a gamble unless someone who has experienced this before somehow shares his knowldge and experience on the matter..

Thank you so much for all the kind help you can give..

Gratefully,
Matt

P.S.
It does not appear like the error is a trappable one ... I did some experiments but I will continue trying to do some more
0 Likes
256 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Thanks, I have already solved the problem

Matt
0 Likes