Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

API Programming (post processing).

Status
Not open for further replies.

MarvinGopal

Structural
Joined
Nov 28, 2012
Messages
4
Location
JP
Hi guys,

I hope someone here can help me out with API programming. I looked through the femap forum here and all the API threads are very old and outdated so thats why i am opening a new thread. I made a macro that's suppose to change some nodes and element (loop) and rerun the analysis multiple times depending on the number of changes. The problem is that if there are more than 50 analysis FEMAP/my computer crashes. What I was looking for was some function to make sure the analysis are after the previous one has been completed. I'm currently reading into "FeEvent" but since I'm new to the whole programming gig, its all blur at the moment. Any help will be much appreciated. Thank you in advance

Marvin Gopal
 
Hi Marvin,
My first thought was that I'm surprised you made it to 50 analyses before your computer crashed! I assume that when you run the analysis it is running in FEMAP, and when it finishes it imports the results? It depends on the size of your model, but that could be just too much data for one file. I would save each iteration as a different model and just export the analysis files (.dat or .nas or whatever) to run in a batch outside of FEMAP. Then you can import each result file into the corresponding .modfem file.
However, your specific question was about waiting for the run to finish. I have never used FeEvent, or ran an analysis from an API, but I have imported results and waited for that to complete before moving on. It looked like this:
'import Output file
App.feFileReadNastranResults(8,op2Title)
Do While App.feFileProgramRunning()= FE_OK
Wait(2)
Loop

This is in chapter 3.18 File Utility Methods of the api.pdf. feFileExecute might also work, since you can ask it to wait until the program has finished running.

Hope this helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top