I don't know if "erotic" is the right word, since I was mortified, but I used to get an uncontrollable erection every time until I was about 25. I was always turned on by having any guy see me naked. In the case of the doctor, not only was he seeing my naked, but actually inspecting my parts. I had one doctor who would perform a significant portion of the exam fully nude (rather than just a brief drop-trou), and I would be rock hard the whole time. He would always say something like "Don't worry about your erection; it happens to lots of guys," which just made it worse. I tried jerking off in the waiting room bathroom before the exam a few times, but it didn't help. Luckily, I eventually grew out of it.
Would like to be your doctor!!!