The concept of energy in the city is associated with the constituents of urban planning and design at the macro, middle, and micro levels. Among the most important of these constituents are the physical characteristics of the city, urban texture, and spatial structure which play a vital role in the reduction of energy consumption and increased thermal comfort, particularly in the middle and micro levels.The aim of this study is to investigate the energy efficiency in buildings and thermal comfort in urban spaces to avoid conflicting goals in the design of building blocks and urban open spaces. Such investigation seems crucial as both energy consumption and outdoor thermal comfort became more prominent due to greenhouse gases and increased temperature respectively. Therefore, the dominant patterns of urban blocks and urban open spaces are identified, and then, some scenarios are prepared in harmony with the existing urban texture, so that the optimal scenarios can be determined. The eight dominant patterns of urban blocks and 3 dominant patterns of urban open spaces are identified based on field studies, from which 24 scenarios are simulated. DesignBuilder software was used for the investigation of energy consumption of the building and Envi-met software was used for outdoor thermal comfort simulation. The simulations are performed for a period of 12 months. Optimal scenarios show that they could save up to two-thirds of energy in buildings. The urban texture with linear and wide blocks and also open spaces with significant width is found to be the best scenario.