In the automatic assembly of product, the key steps are to automatically get constraint objects and plan the assembly path. For the assembly module of UG, the constraint object is not to be gotten automatically, and the assembly path is planned manually. The algorithm to automatically get object occurrences is proposed to plan the assembly path, and the limitation problem of the existing automatic assembly is solved too. The automatic assembly module is developed in UG by adopting the further development tools. This software can implement the automatic assembly of rapid fixture. The feasibility of the proposed method is verified by operating the typical example in the software.