Basic Write

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

Moderator: uasdknet

Post Reply
ucsballen
Full Member
Full Member
Posts: 5
Joined: 25 Aug 2018, 01:04

Basic Write

Post by ucsballen »

All,

What is the user data used for?

Code: Select all

   nodesToWrite.Add(new WriteValue()
            {
                NodeId = nodeId,
                AttributeId = Attributes.Value,
                Value = new DataValue() { WrappedValue = 155 },
                UserData = <-------
            });

Thank you

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

Re: Basic Write

Post by Support Team »

Hello ucsballen,

You can use UserData to pass your own data through a method call.
An example how UserData is used can be found in our getting started client Write method found in BasicWriteDlg.cs.
A TextBox is passed via UserData into the write call and is used out of the write results to set the write result status in this TextBox.
Best regards
Unified Automation Support Team

Post Reply