ClosestNeighbor

 

The ClosestNeighbor method finds the closest neighbor point from the specified point primary ID.  Returns a Point object.

 

Syntax

object.ClosestNeighbor( PID, SearchAllLayers )

 

Parameter

Type

Description

PID

String

required; point primary ID

SearchAllLayers

Boolean

optional; true to search for the closest neighbor across all the map layers, false to limit the search to the current layer

 

Example

This example finds the closest neighbor to the point with the primary ID "CO" and returns the point primary ID

 

Set CloseCO = CurrentLayer.ClosestNeighbor(PID:="CO", SearchAllLayers:=True)

Debug.Print CloseCO.PIDName

 

Used by: Layer object