A new multiscale approach to the quantitative interpretation of scanning probe microscopy data in terms of the local electronic properties of 1D systems such as carbon nanotubes is presented. The interactions between a probe and the system are treated using a combination of first-principles density functional calculations and continuum electrostatics modeling. Realistic tip size effects are included using an image charge model. It is shown that the local potential at a nanotube on a substrate due to a probe can be calculated quantitatively, allowing experimental data to be analyzed in terms of the electronic structure of defects.