Amrita Pati
Ansys Employee

Hi Changjin, 

My understanding is that the script command for adding an RCWA monitor has not been documented yet. I will check with the team and try to publish it soon. But you can use the addrcwafieldmonitor() function for adding the monitor, next you can use set() function to set the monitor properties, and then you can use the getresult() function to extract the relevant datasets as you would do in an FDTD simulation. 

For example, you may use something like for adding the RCWA monitor:

rcwa = lumapi.FDTD(filename="my_RCWA_file.fsp")#If there is an existing simulation file, pass it as an argument
rcwa.addrcwa()
rcwa.addrcwafieldmonitor()

Please feel free to let me know if you come across any difficulties.

Regards,
Amrita