The data service platform for primary system of distribution network is established based on IEC 61970/IEC 61968 common information model(CIM), and the classification and type identification methods of voltage level and bay container in substation are introduced. For graphic arrangement, division thoughts is adopted to deal with substation and sub-containers arrange recursively. And the tree layout method is used to handle distribution feeders for their characteristics of radial or weak ring shape. Depth-first search and stack technology are combined to complete graphic arrangement. The automatic graphing method proposed is feasible for high degree of sharing graphs and data resources among different application systems of distribution network.