jfcorbett Posted January 17, 2011 Posted January 17, 2011 Does anyone know of an "official" or elegant way of displaying script progress?I'm running scripts that cycle through a large number of small variations in various parameters. I'd like to keep the user posted with some kind of progress monitor, e.g. by displaying a string defined in the script, such as "Calculating case 451/2120, 21% done, approx. 1.2 hours left". In Excel, I would put that string in the status bar (Application.StatusBar). Is there something analogous in WAsP and WAsP Engineering? Right now I'm using a quick and dirty solution: I post the progress string in some dummy object's description (project in WAsP, site group in WAsP Engineering). This trick works fine, but it's not quite obvious and a bit confusing for the user. NB: MsgBox won't do, since it halts script execution.
Duncan Posted January 18, 2011 Posted January 18, 2011 Hi,We were discussing your questions here in the office last week, and thought we should check that you know about developer licencing for WAsP. If the scripting environment is too constraining for what you're trying to achieve (which seems to be true in your case), then you could use a developer licence and get direct programmatic control of the WAsP Workspace object model. The developer licence lets you work with all these classes and interfaces without going through the WAsP GUI. So for example, you could start an Excel VBA project, add references to the WAsP DLLs and do the entire exercise there. This has an extra advantage of giving you a proper code editor and debug environment.This licence doesn't allow you to distribute what you build to others, but it sounds like you're just trying to do a big automation/experiment job on your own machine, and for that, it's perfect.To answer your question, though, I'm afraid there's no method you can call from a script to report progress back to the user. If your script is outputting to Excel, then you could update one cell to display the current progress.
jfcorbett Posted January 18, 2011 Posted January 18, 2011 I would certainly like to get a developer license, as it would make life a bit easier. Still, for most purposes, WAsP scripting works fine, and I can distribute the resulting script for use across our organisation. Thanks for your answer!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now