Amrita Pati
Ansys Employee

Hi Shaoyan,

Thanks for the feedback. I understand that we don't have sufficient information online when it comes to a few of the script commands. I will bring this up internally and we will see how we can add more information to our current articles. But at present these webpages are the only places we document the script commands. 

Coming to the specific concern on setting interface positions, you can set the reference positions by script using the "set" or "setnamed" commands for the "interface reference positions" property. The argument is a cell array of cell arrays where there is an inner cell array for each enabled reference position. The cell array for the interface has three fields: name, type and interfaces. So an example cell array would be:
{{"::model::rectangle", "max", 1},{"::model::rectangle", "min", 1}}
An example script command to set this property would be:

setnamed("RCWA", "interface reference positions", {{"::model::rectangle", "max", 1},{"::model::rectangle", "min", 1}});

Let me know if you need help with any of the other script commands.