JGoeransson
Mechanical
- Nov 25, 2010
- 2
Hello.
I have a problem I can't seem to find a proper solution too.
I have a number of different structures to analyse, each structure have between 3 and 5 different loads (by which I mean I have structural loads on 3 to 5 separate places at once, on each structure) as well as several different loadcases for each structure. This amasses to a very large number of analyses and manually scripting the different loadings and postprocessing them is not a viable solution. So I want to write some code in order to automatically read all my loads from the stand-alone textfile containing all the loads from within my macro. By doing that I can let all the analyzes run by themselves without me needing to interfere.
These are the problems I have encountered:
1. Only one way to read text from an outside textfile (to the best of my knowledge): *SREAD. Which has a limit of 128 character long strings. This means that some data is left out when performing the read.
2. I can't find a way to delete the useless characters (which are predetermined in locations and lenght, inside the textfile) after I have opened the textfile (I presume that I can use *CFOPEN to open my textfile with load data).
So, my question/-s is simple I suppose:
Can I open a textfile with some command and edit it? I.e deleting characters in certain places?
Alternatively:
Can I read strings or characters from predefined places in a stand-alone textfile?
Best regards
Joakim Göransson
I have a problem I can't seem to find a proper solution too.
I have a number of different structures to analyse, each structure have between 3 and 5 different loads (by which I mean I have structural loads on 3 to 5 separate places at once, on each structure) as well as several different loadcases for each structure. This amasses to a very large number of analyses and manually scripting the different loadings and postprocessing them is not a viable solution. So I want to write some code in order to automatically read all my loads from the stand-alone textfile containing all the loads from within my macro. By doing that I can let all the analyzes run by themselves without me needing to interfere.
These are the problems I have encountered:
1. Only one way to read text from an outside textfile (to the best of my knowledge): *SREAD. Which has a limit of 128 character long strings. This means that some data is left out when performing the read.
2. I can't find a way to delete the useless characters (which are predetermined in locations and lenght, inside the textfile) after I have opened the textfile (I presume that I can use *CFOPEN to open my textfile with load data).
So, my question/-s is simple I suppose:
Can I open a textfile with some command and edit it? I.e deleting characters in certain places?
Alternatively:
Can I read strings or characters from predefined places in a stand-alone textfile?
Best regards
Joakim Göransson