4D modeling integrates 3D model with project time schedule to provide virtual simulation for identifying spatio-temporal problems earlier in construction projects. However, constructing a 4D model takes a significant amount of time and is prone to man-made errors due to its manual steps and repetitive nature. Therefore, in this study, a model based two-phase method is developed to facilitate linking 3D model with the schedule by automating the cumbersome steps. In the first phase, 4D Task IDs are created and assigned automatically to the model elements using a pattern that depends on their properties. In the second phase, using these IDs, the method generates a task ID list for scheduling and the search sets for simulation in order to map the model elements with the schedule tasks automatically, according to matching IDs. Hence, using shared IDs enhances the communication between 4D modeling tools. The efficiency of the method was tested with a well-known office building model constructed in Revit. The schedule was completed in Microsoft Project and 4D simulation is performed in Navisworks. The automated steps offered by the method were coded in Dynamo add-in of Revit. The analysis result showed that the developed method generated a 4D model in a shorter time compared to the manually performed one.