The influence of the π- and ρ-exchange potential on magnetic properties of nuclei