How to read in a text file containing a scalar value into ansys
How to read in a text file containing a scalar value into ansys
(OP)
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





RE: How to read in a text file containing a scalar value into ansys
why "won't work"? What exactly did you try? What and how gave an error?
Regards
RE: How to read in a text file containing a scalar value into ansys
the error was "Disp is not a vector"
regards
RE: How to read in a text file containing a scalar value into ansys
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