OPC UA .NET Client - Get OPCUA Node ID using browse path

3.3k views Asked by At

I'm working with the OPC Foundation's .NET Standard stack and need to get a node ID using its browse path. With the Python FreeOPCUA implementation I've been using, it is easily done like this:

obj = root.get_child(["0:Objects", "2:MyObject"])

I'm just looking for the equivalent of that and haven't found a set of documentation that's been helpful so far. I can browse the entire root node using code from one of the sample applications. I want to avoid that overhead since I know exactly where the node I'm looking for is located and just need its ID.

1

There are 1 answers

1
Kevin Herron On BEST ANSWER

You're looking for the TranslateBrowsePathsToNodeIds service.

It looks like there's an example of how to call it in the ClientUtils class in one of the examples here.