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 cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to read in a text file containing a scalar value into ansys

Status
Not open for further replies.

vinny31

Mechanical
Joined
Oct 4, 2005
Messages
48
Location
IE

Hi
I have a single file called Disp.inp containing one scalar value.
This scalar value is variable depending on the analysis

I wish to read in this scalar value into another analysis
can anyone help?

A * vread, *get, *tread wont work any suggestions?

regards
V
 
Hi,
why "won't work"? What exactly did you try? What and how gave an error?

Regards
 
Hi
the error was "Disp is not a vector"

regards
 
Hi,
without having at least basic info about the sequence of operations/commands you tried, one can only guess...
There surely is a mismatch in the declaration of the variables.
If you want to read the value from a file, the usual way is to store it in a TABLE or an ARRAY. You can not store that file's data in a scalar, even if it contains one single value. You do can declare (*DIMension) an array to have unit length, so it will expect only one value.
Any time you will have to access to this value, however, you will have to write something like blah=array(1).

Hope this throws some light somewhere...

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top