GetBuiltInType() returns 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
anhvu
Jr. Member
Jr. Member
Posts: 1
Joined: 26 Oct 2021, 18:54

GetBuiltInType() returns null

Post by anhvu »

Hi,
I'm having trouble with the

Code: Select all

`GetBuiltInType()`
method to know the data type and correctly write the data.

It seems that there is a check `datatypeId.NamespaceIndex != 0` in
https://github.com/OPCFoundation/UA-.NETStandard/blob/master/Stack/Opc.Ua.Core/Types/Utils/TypeInfo.cs.
Since my node has `namespaceindex = 2`, obviously it will always return null.

What is the reason for this check? And what can I do to get the correct built-in type in this case?

Thanks and Regards,
Anh

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

Re: GetBuiltInType() returns null

Post by Support Team »

Hello Anhvu,

first off all this Forum is intended for users of the Uinfied Automation .NET based OPC UA SDK, not for questions to the OPCFoundation .NETStandard SDK. That said, the "advantage" of using commercial SDK is the good support and documentation that comes with it.

But by the way, the method seems correct. It is made to get the BuiltInType of DataType Nodes.
If you add a valid TypeTable this method should also work with custom derived DataTypes in Namespace 2.
Best regards
Unified Automation Support Team

Post Reply