Abstract:Now the automobile market is in the increasingly fierce competitive environment, which put forward higher request to the automobile product design and development cycle, production cost. As a bridge between the product design and development and manufacturing, digital factory plays a key role. Based on the analysis of structure of air gun, corresponding links were established in Tecnomatix. Kinematic joints among the links were defined. Through kinematic analysis, the functions of each joint were obtained. A program for generating kinematic functions was developed based on VBA. In the end, the kinematics simulation of the welding gun was achieved.