Please help me with this
I have Arcmap 9.3
On this i have 2 layer points witch i need to calculate the distance between all the point on layer 0 and other point on layer 2
But i need to tdo this in vba of Arcmap by this logic situation
-get the all the point in layer 0 and storied them in an array
get all the point in layer 2 and stored them in a nother array
no calculate the distance for each point on layer 0 to each point on layer 2
this is a formula : dist_layerp = Sqr((x2 - x1) ^ 2 + (y2 - y1) ^ 2)
IF the distance between point on layer 0 and point on layer 2 is 50 or - 50 create a field on table with value 0
But the trick is that i need to search in layer 2 if the point to point is another 50 end then stop it he distance from next point is more then 50
the picture Bellow shows what i need.
Thankyou very much for your help
i need to user the near point direct from layers
So a need to calculate the distance from point on the line of layer 0 to the near point of layer 2 but need to do this using vba macro
How to eun generate point table from vba code?
Have a look following samples;
Additionally you may create a geoprocessing model to simplify your work.
Well i looked at the reference.
The problem is that i need to get the coodonate from all point of layer 0 and 2 and then calculate there distance.
I wander is there a way to do this by put all point in a collection or somehow to calculate there distance using vba macro on Arcmap 9.3.1