I've written an api program that involves running an analysis and processing the results. I've used the following code to 'pause' the program whilst the analysis is carried out:
am.Analyze(amID) 'Analyze model OutputCount = OutputCount + 1 Do While App.Info_Count(FT_OUT_CASE) = OutputCount 'Idle Loop App.feAppMessage(FCM_COMMAND, "Results imported")
However, this code falls over if the analysis fails as the program is stuck in the loop. Can anyone reccomend a way to check for an error in the analysis and subsequently exit the program?
Any help appreciated!
Thanks for your reply! What methods would i use to acheive that?
I've looked into using the feAppEventCallback method, however i would rather just pause the prgram while it waits for the event than have to call another program file to continue.
you can see in my old post (http://community.plm.automation.siemens.com/t5/Femap-Discussion-Forum/Extended-Print-Dialog-API-Can-...) how can you use the FileSystemObject (you must add it first to References as in my macro).
For example you can check the size of the LOG file, and when it changed, you can read and analyze it. More help you can found here: