Erik Kostson
Ansys Employee
This will do what you need (change the C: drive to whatever location you need):

*GET,nbmode,ACTIVE,0,SOLU,NCMSS
*DIM,PF,ARRAY,nbmode,6
*do,i,1,nbmode
SET,1,i
*GET,PF(i,1),MODE,i,PFACT,,DIREC,X
*GET,PF(i,2),MODE,i,PFACT,,DIREC,Y
*GET,PF(i,3),MODE,i,PFACT,,DIREC,Z
*GET,PF(i,4),MODE,i,PFACT,,DIREC,ROTX
*GET,PF(i,5),MODE,i,PFACT,,DIREC,ROTY
*GET,PF(i,6),MODE,i,PFACT,,DIREC,ROTZ
*enddo
*CFOPEN,ParticipationFactor,txt,'C:\\'
*VWRITE,PF(1,1),PF(1,2),PF(1,3),PF(1,4),PF(1,5),PF(1,6)
(6(' ',F10.5))
*CFCLOS