Environment.FindClosestVertex (Point, Double, out Int32) Method
The returned entity index refers to the Entities if there is no current BlockReference, else it refers to the Block.Entities
of the Block referred by the CurrentBlockReference.
Also, the closestIndex point is in the coordinate space of the CurrentBlockReference so, if there is a current BlockReference, to get the 3D world coordinates
of the closestIndex point you need to transform it by the CurrentTransformation.