To expand further upon what the above poster said, moves are only sketched in field/gym trainer battles and wild Pokemon battles. They cannot be sketched from the Battle facilities, online play, or local play. A good rule of thumb: If you gain EXP from the battle, the sketched move remains.