Delete Tag(s) from DeviceHub for One Litmus Edge
To delete Tag(s) with Litmus Excel Add-ins, you should be familiar with how Devices work in DeviceHub on Litmus Edge as well as the consequences.
Before You Begin
- You have installed the Litmus Excel Add-ins extension. See Install Litmus Excel Add-ins for details.
- You have prepared a Tool file.
- Tag(s) have been added to DeviceHub.
Initial Preparation
Open a new Tag Management Tool File in Excel.
If prompted, Enable Content to allow the code to run.

Make sure the the tool is set to One LE for the Connected To option.

Delete Device(s)
Import Tag(s)
Import the Tag Settings for tag(s) defined on Litmus Edge using the Import Tag(s) Wizard.

Users can set a filter to reduce the number of Tag(s) shown as selection to the user.
- Search Option: Select what type of filter is to be used
- Tag Name Mask: Set the filter to be applied. Will be ignored if Search Option is set to ALL
- DeviceHub Devices: Select if you want to tags only from a specific device.
Important: If more than 50000 tags are defined on the selected Litmus Edge, a user can only search for tags for one single DeviceHub device.
- The wizard will show what filter will be applied.

- Press the Search button to pull the filtered List of devices from Litmus Edge.

- The user will be shown the filtered List of tag(s) matching their filter.

- Select the Tag(s) to import and press the Import button.

Notes:
Users can choose between:
- Press New Search to set another filter and search again if the list doesn't show the tag(s) the user wanted to import
- Select All Tag(s) using the Checkbox in the Header Row.
- Select a Group of Tag(s) by selecting their respective Check Box
- Select one Tag by selecting the respective Check Box
- Select No Tag and close the Wizard pressing the Close button instead.
- The selected tag(s) with their settings are imported into the sheet. Once finished, the user can either.
- perform another search using the New Search button
- finsih the import using the Close button

- The Action for each imported tag is set to M for modify.

Mark Tag(s) for deletion
Change the Action to D for the Tag(s) you want to delete on Litmus Edge.

Notes:
Set the Action to I for ignore for tags in the sheet you do not want to process.
Executing Actions
If the tool also includes tag(s) with either the Action A or M, it is Recommended but not mandatory to verify the configuration first without executing the Action by pressing the Verify Only button.

This will check that all required Device Settings are provided and logically correct. And provide any finding to the user. Example: Below the user did select to have Meta Data but did not provide any.

Important: The tool can not verify if all provided device settings are factually correct. For example it can not verify that the network address provided for the PLC is the correct IP address.
The Device(s) can be deleted from Litmus Edge by pressing the Verify + Execute button.

This will check that all required Tag Settings are provided and logically correct. And provide any finding to the user. Example: Below the user did not set a Register Address / Path.

Important: The tool can not verify if all provided tag settings are factually correct. For example it can not verify that the register address provided for the tag is the correct register address on the PLC.
The Tag(s) can be deleted from Litmus Edge by pressing the Verify + Execute button.

This will check that all required Tag Settings are provided and logically correct. And provide any finding to the user. If no issues have been identified, the tool will verify that the user wants to execute ALL the actions from the Action Column:
- A: Add Tag(s)
- M: Modify Tag(s)
- D: Delete Tag(s)
- I: Ignore Tag(s) -> do nothing
To perform all actions, press the Yes button.

The Tool will perform ALL Actions. When finished, a result Summary is shown. Close the Result Summary by pressing the X close button.

The tool will ask if the user wants to re-compare the Tag(s) against Litmus Edge. To re-compare, press the Yes button. To not re-compare, press the No button.

If the User selected to press the Yes button from aboves messagebox, the tool will pull all the tag settings from Litmus Edge again including the RegisterID and also change the Action to M for each Tag with a RegisterID or A for devices with no RegisterID. Tag(s) with an Action of I will not be updated.
