I would like to write all of the x,y values for the POINTs to File2 and all the VERTEX x,y values to File1. The x value is on line 4 from both VERTEX and POINT and the y value on line 6 from both VERTEX and POINT.
So File1 is a list of VERTEX and looks like
vx1, vy1
vx2, vy2
vx3, vy3
vx4, vy4
vx5, vy5
vx6, vy6
...
and File2 is a list of POINTs and looks like
xp1, yp2
xp2, yp2
...
Every xp1, yp1 in File2 is also located in File1.
I need to find these points xp1, yp1 in File1, delete it, and replace it with two new values, a new vx, vy.
example--- xp1, yp1 is the same value as vx3, vy3. I need vx2, vy2 and vx4, vy4 to do calculations. Then I need to delete vx3, vy3 and replace it with vx31, vy31 and vx32, vy32.
Below is the same data that I am using and what
values I need. Thanks for your help and I hope to
hear from you soon.
> > example
> > VERTEX
> > 8
> > 1
> > 10
> > 440.5282 26 (Vertex vx1)
> > 20
> > 267.931852 (Vertex vy1)
> > 0
> > VERTEX
> > 8
> > 1
> > 10
> > 903.665710 (Vertex vx2 - x1 value for
> > calculation)
> > 20
> > 424.695464 (Vertex vy2 - y1 value for
> > calculation)
> > 0
> > VERTEX
> > 8
> > 1
> > 10
> > 851.607625 (Vertex vx3 - Also POINT xp1)
> > 20
> > 496.102325 (Vertex vy3 - Also POINT yp1)
> > 0
> > VERTEX
> > 8
> > 1
> > 10
> > 828.895143 (Vertex vx4 - x2 value for
> > calculation)
> > 20
> > 526.760804 (Vertex vy4 - y2 value for
> > calculation)
> > 0
> > VERTEX
> > 8
> > 1
> > 10
> > 401.846293 (Vertex vx5)
> > 20
> > 382.212539 (Vertex vy5)
> > 0
> > VERTEX
> > 8
> > 1
> > 10
> > 440.528226 (Vertex vx6 - same as vx1-completes
> > loop)
> > 20
> > 267.931852 (Vertex vy6 - same as vy1-completes
> > loop)
> > 0
> > SEQEND
> > 0
> > POINT
> > 8
> > 4
> > 10
> > 851.607625 (POINT xp1)
> > 20
> > 496.102325 (POINT yp1)
> > 50
> > 214.96
> > 0
> > ENDBLK
edited: Sat Feb 1 16:03:10 2003 by jeffa - title change (was: Please help)
In reply to Basic file processing by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |