Analog circuits automatic evolutionary design is a method of designing analog circuits automatically, how to code the circuit is the primary problem in the analog circuits evolutionary design. In this paper, a new analog circuits coding method is proposed, it is designed by imitating the generation process of the special connected and closed weighted undirected graph, we name it generating coding method. Generating coding method can both represent all kinds of circuits and won't produce any illegal circuits which contain suspended components simultaneously. Using generating coding method design circuit can guarantee evolution algorithm searching circuit in the reasonable space, it is important for improving the efficiency and the scalability of the evolution of analog circuits design. At last, we use generating coding method to design an analog passive filter and an amplifier. In the two experiments, we use the simple genetic algorithm to avoid the influence of the algorithm to the evolutionary design, and the results of the experiments show that generating coding method can be able to design analog circuits effectively, and generating coding method won't produce any illegal circuits which contain suspended components, and the circuits' structure designed by the generating coding method is abundant.