Topic
ReadTextFile to import
Startseite ' Community ' FPScript ' ReadTextFile to import
- Dieses Thema hat 5 Antworten sowie 3 Teilnehmer und wurde zuletzt vor vor 19 Jahren, 10 Monaten von cheriftayyib@yahoo.de aktualisiert.
-
AutorBeiträge
-
27.07.2005 um 00:33 Uhr #33343cheriftayyib@yahoo.deTeilnehmer
Hi,
how can u use the function “ReadTextFile” to import data from the folowing text-file .
X/[µm] Y / [µm]
0 -358.521
3 -358.515
6 -358.508
9 -358.508
12 -358.508
15 -358.502
18 -358.496
. .
. .
. .
. .
. .
. .
. .my path is “C: mp est.txt”
and I want to get the 2 columns and assign their values to respectively X,Y so that:
X=Column1
Y=column2Thanks in advance!
27.07.2005 um 00:57 Uhr #33339Bernhard KantzTeilnehmerUse the [b]Text Data Import Wizard[/b] to import your file.
1)Choose
– Create links
– Import as signals
2) Method: Automatic
3) Several columns, seperated with TAB; Decimal Character: Point
4) Line with names: 1; Column with X-values: 1The result is a [b]text data link object[/b]. You can [b]convert[/b] the data link object into a [b]formula[/b]. Open the context menu (right mouse click) and choose [b]Convert into formula[/b].
The result is a FPScript formula:
[code]
Signal( ReadTextFile(“C:tmptest.txt”, 2, 0, 2, 2, FALSE, _
TYPE_FLOATINGPOINT64, FALSE, ” “, FALSE), _
ReadTextFile(“C:tmptest.txt”, 2, 0, 1, 1, FALSE, _
TYPE_FLOATINGPOINT64, FALSE, ” “, FALSE))
[/code]See also:
FlexPro Online Help
ReadTextFile Function28.07.2005 um 06:34 Uhr #33340cheriftayyib@yahoo.deTeilnehmerThank you for the help.
28.07.2005 um 18:21 Uhr #33338cheriftayyib@yahoo.deTeilnehmerHi,
how can u use the function “ReadTextFile” to import data from the folowing text-file .
X/[µm] Y / [µm]
0 -358.521
3 -358.515
6 -358.508
9 -358.508
12 -358.508
15 -358.502
18 -358.496
. .
. .
. .
. .
. .
. .
. .my path is “C: mp est.txt”
and I want to get the 2 columns and assign their values to respectively X,Y so that:
X=Column1
Y=column2Thanks in advance!
10.10.2007 um 23:09 Uhr #33341Christian RathgeberTeilnehmer[quote]The result is a FPScript formula:
Signal( ReadTextFile(“C:tmptest.txt”, 2, 0, 2, 2, FALSE, _TYPE_FLOATINGPOINT64, FALSE, ” “, FALSE), _ReadTextFile(“C:tmptest.txt”, 2, 0, 1, 1, FALSE, _ TYPE_FLOATINGPOINT64, FALSE, ” “, FALSE))
[/quote]I tried this with Flexpro 7.0 but it doesn’t work. Do I have to change the code?
Thanks
11.10.2007 um 18:14 Uhr #33342Bernhard KantzTeilnehmerYou have to enter two backslashes for the string with the path of the text file.
Example:
“c:\temp\test.txt” -
AutorBeiträge
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.