User defined actions gives you the opportunity to run external applications from the context menu of a device.
This example shows how to define a user defined action to enable/disable a specific switch port.
Create a batch file (port-state.bat) with the following content:
snmpset -c private %1 126.96.36.199.188.8.131.52.1.7.8 integer %2
Note: snmpset.exe located in C:\Program Files\Hirschmann\Industrial HiVision 04.4.00\bin offers SNMPv1 only.
For SNMPv3 you need to use another SNMP tool like Net-SNMP (http://www.net-snmp.org/)
Open the preferences dialog
1. Click on Preferences in Industrial HiVision toolbar
2. Navigate to User defined Actions
3. Click on New to create a new entry.
4. New Entry dialog is shown
Create a new entry to set the Port State based on the user input.
1. Specify a Name for the User defined action
2. Enter the path to the previous created batch file port-state.bat.
3. Use the drop-down box to the right to add the Parameters $IP_ADDR and $USER
4. Add a meaningful text for the user input prompt like Port Admin State (1=on, 2=off)
5. Check the Advanced tick box and enable Event and Message Box
Finalize the user defined action by clicking OK
Click OK to close the preferences window
Run User Defined Action
Right click on a device to open the context menu.
Select Actions - Set Port State
Enter 1 or 2 followed by OK to set the port admin state accordingly.
A message box with the action result is shown.