Page 1 of 1

GetBuiltInType return null

Posted: 07 Jul 2021, 17:22
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

Re: GetBuiltInType return null

Posted: 27 Oct 2021, 11:10
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.