Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Design Tables + Server Busy with VBA Excel Macros 1

Status
Not open for further replies.

rswarich

Structural
Jan 17, 2003
5
US
Hello,
We have a SolidWorks model that uses a very large Excel design table (over 50 dimensions). Just before rebuilding is complete, which seems to take longer in SW2003, sometimes a message box pops up saying Server Busy, and gives the option to re-try to connect to Excel or cancel.
We have written a VBA macro in Excel to open Solidworks and insert the design table.

Our re-seller says design tables are limited to 24 dimensions and that is the problem.

I found something about the OLE server being controllable from within VB on another board-this might work on this problem. The command in VB is:
App.OLEServerBusyTimeout = 20000
But this command does not work in VBA Excel macros.

Questions:
1. Has anyone else experienced similar problems with "large" design tables from Excel in SolidWorks 2003 and the Server Busy message box? Is there any way to eliminate this from the SolidWorks side? Is there a way to speed up the re-build time after inserting design tables?

2. Any VBA experts familiar with how to increase the OLEserverbusytimeout in a VBA Excel macro?


Any other ideas are appreciated. The idea behind our macros is that the user just will hit a button in Excel and have the SW model open and run FEA without having to enter anything else, so having the Server Busy message box wait for user inputs will kill the usefulness of our macro.


Thanks to all.
 
Replies continue below

Recommended for you

If you have a curser in a cell of Excel, SolidWorks cannot access Excel. If you try inserting a BOM in a drawing when the curser was in a cell when working in Excel you will have problems.
This may not be your problem but it's a thought.
 
Does any app. abort after the message box pops?

Sometimes, when an OLE integration takes too long to end, this kind of message pops up. I select reconnect (sometimes more than once) and, after a while, it all end successfuly. Now that you are posting this problem, I think this only occours with Excel, when linking to another app. (not only SW).

I am not experienced in large DT's.

Regards
 
I don't know what causes these "server is busy" but you just have to wait it out. I have waited sometimes 30 minutes before. The larger the DT the longer the waits get.

Your VAR is wrong, DT are only limited to what excel offers you. I have built some extreme DT in past jobs. If I wasn't under a non-disclosure agreement I would show them to you.

Once I start getting those problems I restart my computer and sometimes that helps.

I don't think that VBA API code will help you out. I would try but I don't think it will much for you.

If I remember anything I used to do to get past that problem I will follow up here.

Regards, Scott Baugh, CSWP [spin] [americanflag]
3DVision Technologies
credence69@REMOVEhotmail.com

*When in doubt always check the help*
 
How about showing the code to us that you are using to open the Design table? Are you opening it in a new window, or in SolidWorks?
 
Thanks for all the suggestions so far.
Here's the part of the VBA Excel macro that
brings the design table into SolidWorks.
At this point in the macro, Excel and SolidWorks
are open, and the SolidWorks model is active.
The design table is in a separate Excel file
from where the VBA macros are.


Part.InsertFamilyTableOpen (mypath + "\tempdestable.xls")
Part.CloseFamilyTable

As soon as the design table closes, the part re-builds,
and that is where it hangs up sometimes.



This next part does not work in VBA. Found this on
another message board where someone had the same
Server Busy message, but in standalone VB. This VB
command is supposed to extend the OLE server
timeout to a larger than default time.

App.OLEServerBusyTimeout = 20000


Thanks all.
 
We have had this problem when regenerating large parts that are driven by Excel spreadsheets as well. Our solution was to add this line at the start of the macro:

Application.DisplayAlerts = False

FYI, our parts are driven with over 4000 linked dimensions between Solidworks and Excel.

This seemed to help us, I hope it helps you.
 
Design tables are neat, you can even trick custom Excel stuff into them (drop down lists, etc), but there is still the possible timeout error you describe, the annoying pop up window that cant be removed without the cheese, and the max limitations of Excel itself.

But design tables are primaRILY for people who CANT write macros. Once you reach that point of diminishing returns,
dump the contents of the design table into a vb macro,
and blast the configurations straight from code. Aside from
removing the limitations descibed above, you also have the oppurtunity to ensure the correct data is entered beforehand (if you're any good with creating forms)

You'll also then have the ability to tweak parameters that are not available thru Design Tables.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top