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

Subject: Re: [APDL] How to write/append a data to a file in APDL
Author: Mrugesh Dhorje
Date: 2008-04-28 08:42:24

Hello Mr. Hebbal

Please try out following code .... and of course using input file..I think this should work.
Make sure the name of input file should be different than any of the parameter name.


=============================================================
/PREP7
! I need a command here to OPEN a data file for writing the value of the
*CFOPEN,writeVal,TXT,,APPEND

!!!!!"x" to be obtained in Do loop written in the following line.
*DO, x, 5 , 25 ,5
!!! I need a command here to WRITE/APPEND the value of the "x" in to the
!!data file ! all ready opened
valX=x

*VWRITE,valX
(F5.0)

*enddo
! I need a command here to CLOSE the data file opened
*CFCLOSE
=============================================================



Regards,
Mrugesh Dhorje,

Graduate Student,
Mechanical Engineering Dept,
Texas Tech University
Lubbock, Texas 79409


________________________________

From: xansys-bounces_at_xansys.org on behalf of M.S.Hebbal
Sent: Mon 4/28/2008 02:27
To: xansys_at_xansys.org
Subject: [Xansys] [APDL] How to write/append a data to a file in APDL revised



Author: M.S.Hebbal
Date: 28/04/2008
To: ANSYS User Discussion List
Subject: [APDL] How to write/append a data to a file in APDL
environment.
Ref my mail dated: 26/04/2008 with same subject

Dear sirs/ Madams,

I express my sincere thanks to all those who have attempted to solve my
question directly or indirectly, however I am not able to find a solution
to my problem.

>From the solutions it appears that, my mail is too brief to understand it
precisely. Therefore I am elaborating it and asking the same question in
different way so that the problem is redefined to make it brief as well as
clear.

The objective: of the program is to write the value of the parameter "x"
obtained in each pass of the "do loop" from the program below in to a text
file.

=============================================================
/PREP7
! I need a command here to OPEN a data file for writing the value of the
"x" to be obtained in Do loop written in the following line.
*DO, x, 5 , 25 ,5
! I need a command here to WRITE/APPEND the value of the "x" in to the
data file ! all ready opened
*enddo
! I need a command here to CLOSE the data file opened
=============================================================


My efforts
I tried using *CFOPEN command in the second line and *VWRITE followed
by the appropriate format. I could not obtain the desired outcome as
*VWRITE cannot be used in programming environment (i.e. it cannot be typed
in command prompt)
It would of grate help, if some one could guide me.
My special thanks to
Moderators,
Martin Liddle,
Victor Salit and
Balasubramanian Ram for there kind response.

With warm regards


M.S.HEBBAL,
Asst. Professor,
Department of Automobile Engineering,
Basaveshwar Engineering College,
Bagalkot-587102, INDIA,
Cell. No. 91 9880502450;




^--------------------------------------------------------
| XANSYS - www.xansys.org |
| The Discussion List for users of ANSYS, Inc. Software |
| Hosted by PADT - www.padtinc.com |
^--------------------------------------------------------



Posts possibly associated with message #93058AuthorDateScore
93054[APDL] How to write/append a data to a file in APDL revisedM.S.Hebbal 2008/04/28 
93057Re: [APDL] How to write/append a data to a file in APDLVictor Salit2008/04/28 
93058Re: [APDL] How to write/append a data to a file in APDLMrugesh Dhorje2008/04/28