This [similar previous question](https://movies.stackexchange.com/questions/3316/how-did-sherlock-know-the-combo-for-adlers-safe) 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 and he's *very* observant, so he would have picked up on her measurements. However, how did he know to use that as the code? It may as well have been the distance apart of her curtains!

Furthermore, when Irene decides to meet him in her "battle dress" she doesn't know she's going to want Sherlock to access the safe so it's not like she could "dress" accordingly...

So, how did Sherlock know to use her measurements to open the safe?