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

Subject: Re: [APDL] *vread with mixed character/number array
Author: Bob Weathers
Date: 2002-08-22 09:38:00

Hi Joe,

I do something similar when importing CFD results into ANSYS so I can map
them onto my FE mesh. The guys feeding me the data use '!' as the first
character in row 1 if that line is a comment. I also conclude the file with
'/EOF' so I can count lines and know how many rows of data there are.

My strategy is similar to ashok's.

1. Dimension a string array to, say, 9999 lines of 128 or 256 characters or
whatever.

2. Read in the data 9999 lines at a time until you hit the '/EOF'. If you
have a really big file, you might have to loop.

3. Parse the lines in the string array and pitch out the ones you don't
want.

4. Write the 'keepers' into a NewFile.dat in %C format.

5. Read NewFile.dat into ANSYS using %G or whatever.

It takes awhile to set it up but it is pretty fast. I've always worried
about dimensioning these large arrays and releasing them back to the HEAP by
deleting them when done. I've never had a problem though - seems like it
works ok.

Bob Weathers
bweathers@t...
(608)787-2729


Posts possibly associated with message #40997AuthorDateScore
40991[APDL] *vread with mixed character/number array.Joe Metrisin2002/08/22 
40992Re: [APDL] *vread with mixed character/number array.Dave Conover2002/08/22 
40993Re: [APDL] *vread with mixed character/number array.Peter Frei2002/08/22 
40994Re: [APDL] *vread with mixed character/number array.Joe Metrisin2002/08/22 
40995Re: [APDL] *vread with mixed character/number array.Ashok2002/08/22 
40996Re: [APDL] *vread with mixed character/number array.Gordon May2002/08/22 
40997Re: [APDL] *vread with mixed character/number arrayBob Weathers2002/08/22 
40998Re: [APDL] *vread with mixed character/number array.Peter Frei2002/08/22 
40999Re: [APDL] *vread with mixed character/number array.Ian Prentice2002/08/22 
41002Re: [APDL] *vread with mixed character/number array.Don Shaffer2002/08/22 
41011Re: [APDL] *vread with mixed character/number array.Joe Metrisin2002/08/22 
41013Re: [APDL] *vread with mixed character/number array.John Swanson2002/08/22 
41014Re: [APDL] *vread with mixed character/number arrayBob Weathers2002/08/22 
41077Re: [APDL] *vread with mixed character/number array.Joe Metrisin2002/08/26 
41079Re: [APDL] *vread with mixed character/number array.John Swanson2002/08/26 
41080Re: [APDL] *vread with mixed character/number array.Ashok2002/08/26 
41083Re: [APDL] *vread with mixed character/number array.John Crawford2002/08/26 
41084Re: [APDL] *vread with mixed character/number array.Bob Weathers2002/08/26 
41086Re: [APDL] *vread with mixed character/number array.Ashok2002/08/26 
41093Re: [APDL] *vread with mixed character/number array.John Crawford2002/08/26 
41101Re: [APDL] *vread with mixed character/number array.Joe Metrisin2002/08/26 
41103Re: [APDL] *vread with mixed character/number array.Eric Miller2002/08/265
41106Re: [APDL] *vread with mixed character/number array.Fernand Thomassy2002/08/26 
41110Re: [APDL] *vread with mixed character/number array.Eric Miller2002/08/26 
41112Re: [APDL] *vread with mixed character/number array.Dan Bohlen2002/08/26 
41126Re: [APDL] *vread with mixed character/number arrayBob Weathers2002/08/26 
41161Re: [APDL] *vread with mixed character/number arrayJohn Swanson2002/08/27 
41162Re: [APDL] *vread with mixed character/number arrayBob Weathers2002/08/27 
41178Re: [APDL] *vread with mixed character/number arrayJohn Swanson2002/08/27 
41213Re: [APDL] *vread with mixed character/number arrayJohn Swanson2002/08/28 
41216Re: [APDL] *vread with mixed character/number arrayMartin Liddle2002/08/28 
41237Re: [APDL] *vread with mixed character/number arrayBob Weathers2002/08/28 
41239Re: [APDL] *vread with mixed character/number arrayJohn Swanson2002/08/28 
41242Re: [APDL] *vread with mixed character/number arrayJoe Metrisin2002/08/28 
41271Re: [APDL] *vread with mixed character/number arrayFernand Thomassy2002/08/29 
41273Re: [APDL] *vread with mixed character/number arrayJohn Swanson2002/08/29