The practice of manual generation of primary equipment wiring diagram, equipment attributes, misoperation prevention rules and manual writing of operation order,in the current substation misoperation prevention system and dispatch misoperation prevention system,is time-consuming and labor-intensive,which is inconsistent with the requirement of the automatic system.A method of automatic generation of diagram-database-rules-order based on the bay model is proposed.A typical bay model including primary typical bay and secondary typical bay is developed,based on which,a method of automatic generation of primary equipment wiring diagram,database,misoperation prevention rules,operation order is described.Also developed is the software of automatic generation of diagram-database-rules and operation order.The research results are in application.