Accessing elements of an imported model

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

Moderator: uasdknet

Post Reply
kratsching
Jr. Member
Jr. Member
Posts: 2
Joined: 06 Aug 2015, 13:44

Accessing elements of an imported model

Post by kratsching »

Hello,

I'm new to this topic and I've gone through the tutorials and the webinars regarding the .NET SDK and I already searched this forum but still I have this question:

How can I accesselements of a depicted model I generated with UAModeler?

You can use UAModeler to create an information model. You can create individual types (objects, variables, etc) and you can already add elements to the root-folder or the objects-folder or wherever whitin the hierarchie. When you then create the server you can import the generated model using the .xml-file and the .cs-files UAModeler auto-generates for you.
In your Webinar (Development_of_NET_Applications_for_OPC_UA_Part_3_of_3) you show a possibility to add objects to the model (in this case "TheFurnace"). This also works for me and I can also use the different types I created in UAModeler. But how can I access elements that are already available through the .xml-file?

Greetings

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

Re: Accessing elements of an imported model

Post by Support Team »

Hello,

You can access instances that are defined in the XML file using the method FindInMemoryNode or one of its overloads. You can construct the NodeId with the identifiers that are auto-generated in the file <Name>Identifiers.cs.

Best regards
Support Team

Post Reply