Ok - this is a very similar question to this one. The previous question established that in A Scandal in Belgravia Irene Adler's safe combination was her measurements. However, how did Sherlock know to use that combination?
Irene is naked, he's VERY observant so he would have picked up on her measurements. However how did he know to use this code? It may as well have been the distance apart of her curtains!
Furthermore, when Irene decides to meeting him in her "battle dress" she doesn't know she's going to want Sherlock to access the safe so she couldn't "dress" accordingly...
So, how did Sherlock know to use her measurements to open the safe?