I want to open a text file, extract some data, and export that data to another text file (an AutoCAD script). For that I will need to insert some commands before each piece of data I extracted, create a new line, and continue with the operation.
More specific, the original file looks like this:
I want it to look like this:
So I want to extract the data between ":" and the first "," and from the first "," to the second "," and insert them into a text file.
Now how the heck do I do that?
If you have done that already, please send me something to reverse engineer, or please tell me the syntax. Thank you!
Dorel Octavian Cionvica
More specific, the original file looks like this:
Code:
Here goes the header... some info about the program
that generated this file.
useless information
p01 point: 12345.12345,54321.54321, more useless data
p02 point: 56789.56789,98765.98765, more useless data
useless information
end of file
Code:
; --- HEADER ---
filedia 0
cmddia 0
; --- BODY ---
_open
"c:\drawing.DWG"
_point Point: 12345.12345,54321.54321
save
_point Point: 56789.56789,98765.98765
save
; --- FOOTER ---
filedia 1
cmddia 1
quit
Now how the heck do I do that?
If you have done that already, please send me something to reverse engineer, or please tell me the syntax. Thank you!
Dorel Octavian Cionvica