×
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

write array parameters into txt file

write array parameters into txt file

write array parameters into txt file

(OP)

hello fellow ansys-users,

let's say I have succesfully created an array with name "evalx". This array has a dimension of 39 rows by 12 columns. The rows contain the nodal x-displacement of selected nodes and the columns contain the corresponding eigemodes.

And now I want to print the array with 39 rows and 12 columns as a .txt file on my harddrive. I have copid the command line as follow:

*CFOPEN,outputdateiXmode1a,txt,,C:\User\Documents\Eigenmodes\evalx\
*VWRITE,evalX(1,1)
(F10.5)
*CFCLOS

As far as I have understood it, it loops automatically, writing values from each row and each column.

However it does not function and I got a "COMMAND LINE CLOSED" notification on the outpot window.

Could somebody please help me? I thank you very much.

RE: write array parameters into txt file

you should tru *mwrite command.

*MWRITE, evalX, C:\User\Documents\Eigenmodes\evalx\outputdateiXmode1a, txt, , JIK, 12,
(12F10.5)
or you will have to add
*VWRITE,evalX(1,1),evalX(1,2), evalX(1,3),evalX(1,4),evalX(1,5), evalX(1,6),evalX(1,7),evalX(1,8), evalX(1,9),evalX(1,10),evalX(1,11), evalX(1,12),

and it can only be used via batch mode or via /input command

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