XPLMGetNextNavAid
From X-Plane SDK
XPLMGetNextNavAid
XPLM_API XPLMNavRef XPLMGetNextNavAid(
XPLMNavRef inNavAidRef);
Given a nav aid ref, this routine returns the next navaid. It returns XPLM_NAV_NOT_FOUND if the nav aid passed in was invalid or if the navaid passed in was the last one in the database. Use this routine to iterate across all like-typed navaids or the entire database.
WARNING: due to a bug in the SDK, when fix loading is disabled in the rendering settings screen, calling this routine with the last airport returns a bogus nav aid. Using this nav aid can crash x-plane.
X-Plane SDK