×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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

Hi,
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

(OP)
Hi
the error was  "Disp is not a vector"

regards

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

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources