Text file 1:
.ERR - Max6 Error file
[2 19.40 44.7] X6.950 Y-4.705 106.522, 222.048
Open -106.522, 222.048
[2 05.52 39.6] X7.720 Y5.010 214.550, 205.048, 101.078
Open -214.550, 101.078
[2 07.69 39.2] X7.786 Y3.489 215.574, 214.075, 204.067
Short +202.059, 204.040, 204.539, 205.539, 205.540, 207.039, 208.039, 207.539, 207.540, 208.059, 208.060
Text file 2
------------------------------------------------------------------------------
AGILENT ICT FIXTURE TRACE REPORT Thu Jul 30 23:13:56 2009
D:/Jobs/Emerson/thm1340/atca7105/fixture/trace
------------------------------------------------------------------------------
Fixture Type : Agilent SimPlate Express
Fixture Size : Full
Fixture Part Number : 44200L
Top Probes Allowed : Enabled
Autofile : 100
Units : English
Wiring Method : Automatic
-----------------------------------------------------------------------------
( Pin ) [ Probe ] Length = in.
-----------------------------------------------------------------------------
Node Name "Node Name"
Probe[Top] [b rr.rr cc.c] On Device.Pin
Alternate On Device.Pin
Wire Color: "Color" Gauge: "Gauge"
Path (b rr.rr cc.c) <Length> (b rr.rr cc.c) <Length> [b rr.rr cc.c]
Use "Use"
-----------------------------------------------------------------------------
Node Name 3N210
Top [2 11.13 -00.9]
Wire Color: Blue Gauge: 30
Path (2 03.43 -05.7) <6.0> [2 11.13 -00.9]
Use Transfer
Path (1 00.50 53.0) <6.5> (2 03.43 -05.7) <6.0> [2 11.13 -00.9]
Use Shorts Test ASRU Source Analog Guard
Path (1 01.00 52.0) <6.5> (2 03.43 -05.7) <6.0> [2 11.13 -00.9]
Use G Bus Sense
-----------------------------------------------------------------------------
Node Name MEM_B_DQ6_R
Probe [2 11.00 32.7]
Wire Color: Blue Gauge: 30
Path (2 11.50 67.0) <5.5> [2 11.00 32.7]
Use ASRU Detector Shorts Test
Path (2 10.50 67.0) <1.0> (2 11.50 67.0) <5.5> [2 11.00 32.7]
Use I Bus Sense
-----------------------------------------------------------------------------
Node Name MEM_B_DQ7
Probe [2 07.69 39.2] On Device: s3.99
Wire Color: Blue Gauge: 28
Path (2 04.00 67.0) <5.5> [2 07.69 39.2]
Use ASRU Detector Shorts Test
Path (2 14.00 75.0) <7.5> [2 07.69 39.2]
Use S Bus Sense
What i need to do is , i have to read my first text file get the value in [ ] then compare that value with second text file . If value exist in second text file, i must search for Node name in that particular group. then i must copy that value and past in my text file 1
For example
Text file 1
[2 07.69 39.2] X7.786 Y3.489 215.574, 214.075, 204.067
Short +202.059, 204.040, 204.539, 205.539, 205.540, 207.039, 208.039, 207.539,
i read the value [] then match with second file so i will get this group from second file
Text file 2
-----------------------------------------------------------------------------
Node Name MEM_B_DQ7
Probe [2 07.69 39.2] On Device: s3.99
Wire Color: Blue Gauge: 28
Path (2 04.00 67.0) <5.5> [2 07.69 39.2]
Use ASRU Detector Shorts Test
Path (2 14.00 75.0) <7.5> [2 07.69 39.2]
Use S Bus Sense
From here i have to read the Node name which is MEM_B_DQ7
From this file i have to copy the Node name which is MEM_B_DQ7 and past it in my Text file 1
[2 07.69 39.2] X7.786 Y3.489 215.574, 214.075, 204.067
Short +202.059, 204.040, 204.539, 205.539, 205.540, 207.039, 208.039, 207.539,
MEM_B_DQ7
is that possible to do
thank you
I try to match the value in [] from text file and two
Dim FileContents() As String = IO.File.ReadAllLines(TextBox1.Text)
Dim FileContents1() As String = IO.File.ReadAllLines(TextBox2.Text)
Dim fc As StreamWriter = File.CreateText("C:\kaya5.txt")
For Y As Integer = 0 To FileContents.GetUpperBound(0)
For x As Integer = 0 To FileContents1.GetUpperBound(0)
If Not FileContents(Y).Trim = "" Then
Dim firstChar As Boolean
If firstChar = FileContents(Y).IndexOf("[") Then
Dim BeginIndex As Integer
Dim EndIndex As Integer
BeginIndex = FileContents(Y).IndexOf("[")
EndIndex = FileContents(Y).IndexOf("]") + 1
Dim Tx As String = FileContents(Y).Substring(BeginIndex, EndIndex - BeginIndex)
Dim BeginIndex1 As Integer
Dim EndIndex1 As Integer
If FileContents1(x).Contains("[") Then
BeginIndex1 = FileContents1(x).IndexOf("[")
EndIndex1 = FileContents1(x).IndexOf("]") + 1
Dim Tx1 As String = FileContents1(x).Substring(BeginIndex, EndIndex - BeginIndex)
If Tx = Tx1 Then
fc.WriteLine(FileContents1(x))
End If
End If
End If
End If
Next
Next
fc.Close()
But can not do?

New Topic/Question
Reply




MultiQuote




|