Application of macrocyclic compounds in chemical analysis