Erik Kostson
Ansys Employee
One way if you doing an ACT extension add these commands as snippet (you can calculate everything you need from the *get, and PFACT or EFECM or MTOT), and then write these to file. Finally read them in to the array or dictionary.
For instance to save the participation factors (similar syntax for effective mass - and ratio of effective mass to total mass is just a ratio which we can calculate once we have effective mass and the total mass (*GET with MTOT)).

--PYTHON FOR SCRIPT TO READ IN DATA--
PFX = []
PFY = []
PFZ = []
EMX = []
EMY = []
EMZ = []
MRX = []
with open('C:\PF.txt', "r") as f:
for line in f:
a=line.strip b=a.split PFX.append(float(b[0]))
PFY.append(float(b[1]))
PFZ.append(float(b[2]))
EMX.append(float(b[3]))
EMY.append(float(b[4]))
EMZ.append(float(b[5]))
MRX.append(float(b[6]))


--APDL SNIPPET--

*GET,NRMODES,ACTIVE,0,SOLU,NCMSS

*DIM,MODAL_PF,ARRAY,NRMODES,3
*DIM,MODAL_EM,ARRAY,NRMODES,3
*DIM,MODAL_RAT,ARRAY,NRMODES,1

*DO,i,1,NRMODES

SET,1,i

*GET,MODAL_PF(i,1),MODE,i,PFACT,,DIREC,X

*GET,MODAL_PF(i,2),MODE,i,PFACT,,DIREC,Y

*GET,MODAL_PF(i,3),MODE,i,PFACT,,DIREC,Z

*GET,MODAL_EM(i,1),MODE,i,EFFM,,DIREC,X

*GET,MODAL_EM(i,2),MODE,i,EFFM,,DIREC,Y

*GET,MODAL_EM(i,3),MODE,i,EFFM,,DIREC,Z

*get,totmassx,ELEM,0,MTOT,X
MODAL_RAT(i,1)=MODAL_EM(i,1)/totmassx

*ENDDO

*CFOPEN,PF,txt,'C:\\'

*VWRITE,MODAL_PF(1,1), MODAL_PF(1,2), MODAL_PF(1,3), MODAL_EM(1,1), MODAL_EM(1,2) ,MODAL_EM(1,3), MODAL_RAT(1,1)
(F15.6,F15.6,F15.6,F15.6,F15.6,F15.6,F15.6)

*CFCLOS

All the best

Erik