I have an X6 and once had to figure this out. These are the notes I made at the time so I didn't forget!
There are two types of midi events to embed at the beginning of your song file: two Controller events and one Patch change event, in the following order. They need to be sent on channel 16 which is the factory set channel the Fantom receives Performance change events on. So, to select User Performance no. 7:
1. Controller event on ch 16: bank select method 0, bank 85. Value n/a.
2. Controller event on ch 16: bank select method 32, bank 0. Value n/a.
3. Patch change event on ch 16: bank select method Controller 0, Value 7.
To select from a Preset Performance instead of a User Performance, substitute 64 for 0 in line 2. above.
After this, if you have an instrument then playing on channel 16 you will need to also insert a patch change event selecting this instrument.
I hope that helps!