A simple theory for interaction energy of dislocations with magnetization through magnetostriction is developed for Permalloy films with varying composition. It is found that the inclusion of the dislocation energy in the total anisotropic energy in the pair‐strain model gives a better fit with experimental results.