XANSYS Message: 40896 [Go back to message list]
[bookmark on del.icio.us]
No rating yet
Rate item:

Subject: Re: Pausing Ansys until certain conditions are met
Author: James Kosloski
Date: 2002-08-19 11:51:00

From Sheldon's site (http://ansys.net/ansys)

/HOLD
/HOLD,filename,timeint,timeout
Read a command from file "filename" if it exists. If it doesn't exist, wait
"timeint" seconds, then keep trying again until "timeout" seconds.

James J. Kosloski
Project Manager
Computer Aided Engineering Associates, Inc
60 Middle Quarter Mall
Woodbury, CT 06798
* office: 203 263 4606 * fax: 203 266 9049
* email: kosloski@c...

-----Original Message-----
Sent: Monday, August 19, 2002 11:41 AM
To: xansys@yahoogroups.com

Dear Ansys users,

I'm writing a macro that requires Ansys to read data in from an
external text file. The text file is generated by another program,
and writes it as the Ansys macro is running. I need Ansys to wait
until the file is created before it proceeds on to the next step in
the macro. What I'd like to do is write a *DO loop that cycles
through a certain number of times, and each time checks to see if the
text file exists, waiting a couple seconds if it hasn't been written
yet. Once the file is there, then it exits the loop and goes on to
the rest of the macro. Is there a command that can be used to see if
a file exists? Like returning a 1 or a 0 to a parameter depending
on whether or not the file is there? Or some other way of going
about
pausing the script until the text file has been written? I have
tried /WAIT,N with different values of N and sometimes this
isn't quite long enough. Thanks in advance.

Allison Bailey
Graduate Student
MAE Dept., Clarkson University


Posts possibly associated with message #40896AuthorDateScore
40895Pausing Ansys until certain conditions are metAllison Bailey2002/08/19 
40896Re: Pausing Ansys until certain conditions are metJames Kosloski2002/08/19 
40898Re: Pausing Ansys until certain conditions are metFernand Thomassy2002/08/19 
40903Re: Pausing Ansys until certain conditions are metDon Shaffer2002/08/19