Hello Everyone
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
Did you try to use "Near", "Point Distance" or "Generate Point Table" tools from toolbox. You can run tools manually or within vba code.
ArcGIS Desktop Help 9.3 - An overview of the Proximity toolset
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;
31110 - Execute geoprocessing tools from within VBA
Run any ArcToolBox Tool with it's parameters Programmatically (Read This!!) - Example: Convert To CA
Call tools from ArcToolBox in VBA form - Geographic Information Systems Stack Exchange
Additionally you may create a geoprocessing model to simplify your work.
Thankyou for your help
I will have a look
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
The tools "Near", "Point Distance" and "Generate Point Table" are not require coordinates. Just you have to set input features (layer 0) and near features (layer 2)
On arcmap 9.3.1 tools i cannot fiind generate point table or point distance or near
Could you please show me a prinscreen or something
I think it requires ArcInfo License.
ArcGIS Desktop Help 9.3 - An overview of the Proximity toolset
So that explain why i don't have this utility
SO i guess i need to fiind a way to do this programabily
Thankyou for your help