1. In a computational device that provides a modeling environment, a method for building an executable block diagram model, the method comprising: identifying, using a processor of the computational device, a reference pattern in an executable block diagram model, the reference pattern comprising a first group of interconnected blocks in a portion of the executable block diagram model, the executable block diagram model included in a model file; programmatically identifying, using the processor of the computational device, one or more other portions of the executable block diagram model having a near-match pattern, the near match pattern being a partial match of the reference pattern, the programmatically identifying comprising: searching the model file of the executable block diagram model, identifying the near-match pattern based on the searching, the near-match pattern comprising a second group of interconnected blocks, calculating a degree of similarity between the reference pattern and the near match pattern by comparing a number of blocks and attributes of the blocks between the first group of interconnect blocks and the second group of interconnected blocks, replacing, in response to the identifying the near match pattern based on the searching and the calculating the degree of similarity, the near-match pattern of the executable block diagram model with an executable block diagram sub-model, wherein the sub-model is a shared executable block diagram model representing the reference pattern, the replacing being performed using the processor of the computational device; and storing an edit of the executable block diagram sub-model, wherein the edit changes the executable block diagram sub-model to correspond to the near-match pattern.