I have been working on setting a new DOM module. I imported a test version of my model using the Excel sheet and Dom Designer automation script. After making some changes, I wanted to start over, so I deleted the module using the Dom Editor and tried to re-create it, but now I get the error:
System.ArgumentException: An item with the same key has already been added.
Any thoughts on how I can track down what key is already there? Or, better, how do I get rid of it?
Thanks!
Hey James,
The easiest way is probably to connect with the SLNetClientTest tool onto the DMA, then Advanced > Apps > DataMiner Object Model. That brings you to a page where you can see the different DOM module instances.
If you select the right one, then click on view, you'll see all the different DOM instances. Selecting one there and clicking view again will show you all the details.
There is also a possibility to delete specific instances from here, if needed.
For reference, here’s a more complete version of the error in the logs:
2023/01/19 22:57:03.444|SLAutomation.exe 10.2.2241.34|10564|66008|CScriptLoader::ExitNow|DBG|-1|[James Stutz] (Script Dom Designer) EXIT: “System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Script.Run(Engine engine)”