A general approach to automatically calculate a datum feature simulator (DFS) for a real part model is proposed in this paper. The geometric errors of the real part are represented by the controlling point variation model (CPVM) of the geometric feature, and the geometric deviations are simulated and generated by the Monte Carlo method. The linear feature and planar feature CPVM models are first introduced; these models can simulate all possible size, position, form, and orientation variations. Furthermore, these models are compatible with the ASME/ISO Standards for geometric tolerances. The determining rules of DFS based on the CPVM model are presented, according to the definitions of DFS by ASME standards. The CPVM models for three common datum features, i.e., the planar datum feature, cylindrical datum feature, and prismatic datum feature, are then established, and the algorithms to determine the corresponding DFSs for a different order of datum precedence are developed. An example is given to demonstrate the establishing method.