External elements Reverse engineering multiple iterations Suppose you want to model external code for referencing, without regenerating it (but the external code might change and the external element should be updated according to the changes in the code). Set up your model as follows: 1. Complete the steps in the previous procedure (see Reverse engineering ) to create a new external model (for example, ExternalModel ). 2. Save your model, then close it. 3. Open a new, development model. 4. Choose File > Add to Model , then select the external model. Select As Reference and select all the top-most packages and the component ( ExternalModel ). The elements are imported as read-only (RO). 5.
Create a dependency with a «Usage» stereotype to the ExternalModel . To synchronize the code changes: 1. Open the external model. 2. Update the reverse engineering options as needed to include the code modifications (such as including new folders), and then click Import . 3. Close the external model. 4. Open the development model. 5. Update the model according to the changes in the external model: a. Remove references to elements deleted from the external model. b. Update references to renamed elements from the external model (they become unresolved). c. New elements are simply added to the model. Rational Rhapsody 603