An action cannot be completed because a component is not res
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
An action cannot be completed because a component is not res

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
matt_1ca
Guest





Posted: Tue Mar 29, 2005 4:42 am    Post subject: An action cannot be completed because a component is not res Reply with quote

What is the usual strategy used by experts to avoid seeing the message: An Action cannot be completed because a component (..) is not responding.

I am using VB to control AutoCAD and often I get a rather unwelcome message saying : An Action cannot be completed because a component (..) is not responding. Choose switch to activate the component and correct the problem.

This happens when the user is supposed to input a value in AutoCAD document but instead makes the common mistake of clicking the VB form instead of clicking the AutoCAD document to input the value.

100% of the time the problem is solved by simply clicking the button that says switch -- which may not be so much of a problem until 50 people continue to make that same mistake and have to click switch everytime just to correct the problem.

Then it starts to be really awkward -- and they are starting to wonder why I did not design the program in the first place to click that switch button programmatically (knowing that it solves the problem 100% of the time) -- so that they do not ever have to see it.

Right now this one has me stumped . Please guide me in any way you can.

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

Matt

Back to top
bcoward
Guest





Posted: Tue Mar 29, 2005 7:40 am    Post subject: Re: An action cannot be completed because a component is not Reply with quote

Matt,

You indicated that...

"This happens when the user is supposed to input a value in AutoCAD document but instead makes the common mistake of clicking the VB form instead of clicking the AutoCAD document to input the value."

This is not the fault of the user but rather the fault of the programmer. In the design specification the devloper allows the user to interact this way because he/she does not force focus back to the AutoCAD document but rather leaves the user to make their own decision...not good.

Change your code to manage the focus. Your testing reveals users will do the unexpected so plan for it.

There are at least two things that I remember from programming school stuff.

1 - The definition of pseudocode
2 - A line a prof used....

A well developed application is one that takes into account all that can't or shouldn't exist. This results in only what exists.


Good luck,

Bob Coward
CADS, Inc
Back to top
Tony Tanzillo
Guest





Posted: Tue Mar 29, 2005 8:20 am    Post subject: Re: An action cannot be completed because a component is not Reply with quote

If you're calling a GetXxxxx() method of the Utility object
from another process, that process will be blocked until
the call returns, which is when the user responds to the
outstanding request for input (or cancels).

The best way to deal with this, is to hide your VB app's
window before calling the GetXxxxx() function, and then
showing it when the call to same returns, or an error is
raised by the call. This way, the user does not have the
option of switching focus back to the controlling app until
the satisfy the outstanding request in AutoCAD.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com

"matt_1ca" <nospam@address.withheld> wrote in message
news:9118643.1112053377852.JavaMail.jive@jiveforum2.autodesk.com...
Quote:
What is the usual strategy used by experts to avoid seeing the message: An Action cannot be completed because a
component (..) is not responding.

I am using VB to control AutoCAD and often I get a rather unwelcome message saying : An Action cannot be completed
because a component (..) is not responding. Choose switch to activate the component and correct the problem.

This happens when the user is supposed to input a value in AutoCAD document but instead makes the common mistake of
clicking the VB form instead of clicking the AutoCAD document to input the value.

100% of the time the problem is solved by simply clicking the button that says switch -- which may not be so much of a
problem until 50 people continue to make that same mistake and have to click switch everytime just to correct the
problem.

Then it starts to be really awkward -- and they are starting to wonder why I did not design the program in the first
place to click that switch button programmatically (knowing that it solves the problem 100% of the time) -- so that
they do not ever have to see it.

Right now this one has me stumped . Please guide me in any way you can.

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

Matt


Back to top
matt_1ca
Guest





Posted: Tue Mar 29, 2005 5:28 pm    Post subject: Re: An action cannot be completed because a component is not Reply with quote

This concept is pure genius!! Thanks Tony, I will implement it right away.

Matt
Back to top
matt_1ca
Guest





Posted: Tue Mar 29, 2005 5:30 pm    Post subject: Re: An action cannot be completed because a component is not Reply with quote

Thanks Bob, I will keep that in mind

Matt
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB