BMW X 3 Panoramic sun roof initialization.
title says X5, but description says X3. i'll explain for an X5, but X3 with the pano should be the same. and i'll explain function of the roof, not reprogramming.
button is located on the panel at the top near the front & center windshield. its the switch on the far left on this panel. its a switch that not only toggles, but also slides forward & back.
with your finger in front of the button, slide it back & release. this will make the cover slide back and store revealing the sun roof. you know have 2 options (tilt the sunroof up or open the roof completely).
to tilt it up, press up on the rear of the button and release. the rear of both roofs will pop up. to close, push up and release the front of the button or slide the switch forward.
to slide it open completely, repeat what you did to open the protective cover (slide the switch from front to back). the roof will open completely and stow out of the way. to close, slide the switch forward and release. pano roof will now close.
to close the cover, slide the switch forward again.
neat trick: if you want to tilt the sunroof open without opening the protective cover, press up on the rear of the button (when the cover is closed) and release. the cover will separate in the middle exposing about a 2-3 inch mesh, then tilts the sunroof open. to close, push the button forward again.
also, if you are above a certain speed (can't remember what it is off hand) with the sunroof open or tilted, it will close automatically, then perform the neat trick on its own to keep air coming in.
one last trick: if you want to open the windows and sunroof from outside, press & hold the unlock button (forward button on the key) and you will see the windows go down, then the roof will open to vent. releasing the button will stop the motion of the windows & roof.
hope this answered what you were asking.