LInkModelToNode throw exception

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
codicezerouno
Jr. Member
Jr. Member
Posts: 4
Joined: 05 Jan 2017, 08:28

LInkModelToNode throw exception

Post by codicezerouno »

Hello,
I generate classes with UAModeler and I'm trying to bind an instance of a generated Model class to the respective object node.

Code: Select all

LinkModelToNode(nodeId, objInstance, null, null, 500);
I got this exception:

Code: Select all

System.ArgumentNullException: Il valore non può essere null.
Nome parametro: key
   in System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   in System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
   in UnifiedAutomation.UaServer.BaseNodeManager.LinkModelToNode(NodeId rootId, Object instance, Object syncLock, IModelMapper mapper, Double minimumSamplingInterval)
   in BA.BANodeManager.Startup() in 
Where could I be wrong?

codicezerouno
Jr. Member
Jr. Member
Posts: 4
Joined: 05 Jan 2017, 08:28

Re: LInkModelToNode throw exception

Post by codicezerouno »

Hi, I found what is causing the issue: I was creating NodeId by using numeric identifier. Using string identifier solved the error.
Thanks

Post Reply