How can you calculate the distance between the grids (coordinates) with a dynamo?

All elements of category to get the grids.
List.SortByKey with the name as the key.
Grid.Curve to get the location curve.
List.DropItems to remove the first Curve from the list.
Geometry.DistanceTo to get the spacing from the grid curves to the associated first item removed curves.