Optional Properties are not available via browse

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

Moderator: uasdknet

Post Reply
christoph.welte
Jr. Member
Jr. Member
Posts: 2
Joined: 03 Jul 2017, 14:19

Optional Properties are not available via browse

Post by christoph.welte »

using UA modeler A property of a type is marked as optional.
The generated C# code contains an appropriate C# property.
But if using EUA expert such properties are not available within a browse.
What must be done so that the OPCUA server handles optional properties?

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

Re: Optional Properties are not available via browse

Post by Support Team »

Hello Christoph,

By default only children with ModellingRule Mandatory are created. You have to specify the OptionalBrowsePaths in CreateInstanceSettings. For each optional child you want to create you have to add one string to the list. Please use AbsoluteName.ToString(params QualifiedName[] browseNames) to create the strings.

Please see:
Best regards
Unified Automation Support Team

alilazzal
Jr. Member
Jr. Member
Posts: 4
Joined: 09 Dec 2020, 11:53

Re: Optional Properties are not available via browse

Post by alilazzal »

Hello,

can you provide an puesdo code example of CreateInstanceSettings while using OptionalBrowsePaths to instantiate a optional variable in my server code?

I am trying to instantiate CounterPerType variable (Optional) as a child of an object called MyObjectType in ObjectType.

Thank you in advance,

Post Reply