A dicationic tecton bearing four NH and two OH groups, as primary and secondary hydrogen bond donor sites, respectively, leads, in the presence of [M(CN)4]2− anions, to the formation of polymorphic 2- and 3-D hydrogen-bonded networks.