Abstract:Distances, the geohazards far away from the seismogenic fault, related to propagation and attenuation of the seismic wave are essential variables taken into account in the evaluation of factors raised the geohazards, which can be obtained with the aid of related functions of some graphics softwares. Besides the prevalent GIS software, a custom command in the Auto CAD system was developed, which was used to solve the problem of distances between positions, where geohazards have arisen, and faults. The idea governing this approach is as follows, find the closest point on the traces of fault one by one to each geohazard point by the visual LISP function (vlax–curve–get Closest Point to curve-obj givenPnt), and then, output each distance from input point to nearest point obtained on the fault into a result file . According to the test to such custom command suing the cases of geohazards in influence area of “5.12” Wenchuan earthquake, It was taken only about 10 seconds to solve the distances between 10 thousands of geohazards and the traces of fault, on which have hundreds node. So this test proved such a method to be very efficient in the CAD software, as well. At the same time, these cases also showed the significant influence of the fault distance on geohazard associated with earthquakes. Therefore, with regard to such kinds of the down-to-earth routine, although fundamental and tiny, it is necessary to pay attention to research the methods to handle it in various systems of computer graphics software.