GetBuiltInType return null

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

Moderator: uasdknet

Post Reply
DANILOMARIO
Jr. Member
Jr. Member
Posts: 3
Joined: 05 Jul 2021, 17:00

GetBuiltInType return null

Post by DANILOMARIO »

Dim nodoId As NodeId = NodeId.Parse(Node1TB.Text)
Dim variable As VariableNode = New VariableNode() With {
.Value = 0,
.DataType = 3,
.ValueRank = -1
}
Dim Result As BuiltInType = TypeUtils.GetBuiltInType(nodoId, m_session.Cache)

Result is always NULL

User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Re: GetBuiltInType return null

Post by Support Team »

Hello DANILOMARIO,

your method call seems right. We assume you try to get the BuiltInType with the NodeId of a Variable.
GetBuiltInType can only be used with NodeIds of DataType nodes.
You can read the DataType attribute at your Variable and then use GetBuiltInType on that DataType NodeId.
Best regards
Unified Automation Support Team

Post Reply