How do I use script to set the 'Crossing by Net names' and 'Toggle All' in the Crossings tab for PowerConnection check.
The "toggle all" button is local to the GUI - There isn't a way to do that in script.
To set the "crossing by net name" (or any other option you want), just do this:
1: Setup the options in the GUI
2: Press "save" from that rule setup window (such as "Power Connections")
3: Open the Tools >> Script Console
4: Type "plugin configure TheRuleNameYouWant"
(example: plugin configure "Power Connections")
5: Copy the settings from the returned strings. Each setting has a name and a value, corresponding to the GUI names.