agalmari
11-15-2004, 04:20 AM
hi all.
i'm trying to read a .prt file (draw of unigraphics) as an txt file.
i'm looking for the value of a var called fijacion_uy
(the value is 10 and it appear: .....fijacion_uy=10....)
if i open and save it whith the notepad, i can read it from code.
but, if i create a copy changing the extension to txt, i canīt!!
what can i do???
thanks.
i really nead to solve this problem!
agustin
pd_1: the file i use is attach
pd_2: the code i use is this:
******************************
Dim texto as string
Dim ts As New FileSystemObject
ts.CopyFile "C:\aaa.prt", "C:\aaa.txt", True
Dim file As TextStream
Set file = ts.OpenTextFile("C:\aaa.txt", ForReading, False)
Do While Not file.AtEndOfStream
texto = file.ReadLine
If InStr(1, texto, "fijacion_uy") > 0 Then
MsgBox texto & " " & InStr(1, "fijacion_uy", texto)
End If
Loop
file.Close
******************************************
i'm trying to read a .prt file (draw of unigraphics) as an txt file.
i'm looking for the value of a var called fijacion_uy
(the value is 10 and it appear: .....fijacion_uy=10....)
if i open and save it whith the notepad, i can read it from code.
but, if i create a copy changing the extension to txt, i canīt!!
what can i do???
thanks.
i really nead to solve this problem!
agustin
pd_1: the file i use is attach
pd_2: the code i use is this:
******************************
Dim texto as string
Dim ts As New FileSystemObject
ts.CopyFile "C:\aaa.prt", "C:\aaa.txt", True
Dim file As TextStream
Set file = ts.OpenTextFile("C:\aaa.txt", ForReading, False)
Do While Not file.AtEndOfStream
texto = file.ReadLine
If InStr(1, texto, "fijacion_uy") > 0 Then
MsgBox texto & " " & InStr(1, "fijacion_uy", texto)
End If
Loop
file.Close
******************************************