Acknowledge All outside of alert table

I noticed there was no APi reference for acknowledge all, so I made my own code.

alerts = system.alert.queryAlertStatus(activeAndUnacked=1,clearAndUnacked=1) for row in range(alerts.rowCount): system.alert.acknowledgeAlert(alerts.getValueAt(row,"System"),alerts.getValueAt(row,"Path"),alerts.getValueAt(row,"State Name")) fpmi.tag.writeToTag("[]Discrete\Ack",1)

Thanks for this code. I had something similar put together, but it was much less elegant.