It's been over a year since I did exactly this but I *think* you need to have the fuel tank out of the frame! Don't quote me on this but from memory the ignition switch can only be removed from the inside!
You need a special tool (has 2 prongs on it) that will unscrew the large ring around the barrel (on the outside of the frame). I didn't use the tool, I used some mole grips wrapped in cloth but if you have nice paintwork and don't want to cause any damage try and use the correct tool.
Once you have undone the large ring the ignition switch can be pulled into the frame. There are two wires with connectors, just unplug them and you will then have it out!
Remember if you have had your frame painted or powder coated then you will need to make sure the switch touches bare metal at it's one of the earthing points on the bike.
Hope this helps!