hexagon logo

Server Busy error during VBA automation

I have some Excel VBA code that I can call from a PC-DMIS script and it will pull data out of PC-DMIS, manipulate it, and then push it back in. If I generate any message boxes in Excel while this is happening I will get a Server Busy error message if the user doesn't respond to the message box within a few seconds. Does anyone know how to disable this message? I just want it to wait as long as necessary for Excel to finish what it is doing.
Parents
  • Server busy is coming from the Pcdmis side of things, not from Excel. It happens when you launch a script from PcDmis and that script launches some other process and waits for that process to return before continuing. When that second process then looses focus for a period of time, often due to some modal window (message box or similar) popping up, the script that launched it gets impatient and issues this message telling you that that it is trying to continue but can't because the external process isn't returning. There is a default timeout value for COM servers that I think is around 5 seconds. Some applications, from what I can gather, allow you access to this parameter through the API and you can set it to something larger. I could not find any way to change the value in PCDMIS.

    The method posted above seems to work better than calling through the PCDMIS script. Execution seems to be faster and the timeout issue is completely resolved. Everything is still running in Excel. The only difference is in how Excel is called.
Reply
  • Server busy is coming from the Pcdmis side of things, not from Excel. It happens when you launch a script from PcDmis and that script launches some other process and waits for that process to return before continuing. When that second process then looses focus for a period of time, often due to some modal window (message box or similar) popping up, the script that launched it gets impatient and issues this message telling you that that it is trying to continue but can't because the external process isn't returning. There is a default timeout value for COM servers that I think is around 5 seconds. Some applications, from what I can gather, allow you access to this parameter through the API and you can set it to something larger. I could not find any way to change the value in PCDMIS.

    The method posted above seems to work better than calling through the PCDMIS script. Execution seems to be faster and the timeout issue is completely resolved. Everything is still running in Excel. The only difference is in how Excel is called.
Children
No Data