The first energy efficiency law for Brazil was presented in 2001, which required that buildings should have some energy efficiency regulation. Salvador city building code was then submitted to a study to include energy efficiency parameters related to the building envelope. The energy consumption limits were associated with the envelope parameters using simulation and using a multi-variable regression equation developed using simulation. Twelve models were defined with the variables that influence most on energy consumption and were combined to the envelope variables resulting in the analysis of 1616 prototype buildings. This paper describes the simulations that were used to establish the limits presented in the code.