Address space tree deletion

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

Moderator: uasdknet

Post Reply
efzed
Full Member
Full Member
Posts: 7
Joined: 12 Jun 2015, 01:42

Address space tree deletion

Post by efzed »

Hi,
what is the best way to delete all the nodes from the address space?
The goal is to completely clear the address space and rebuild it from scratch.
And to complete the question: what is the best way to delete a subtree from the address space?
One way to do it is to visit the tree from the sub-root and delete every single in-memory node, but is there any simpler (or already implemented) way to do that?
Thanks

Regards,
F.

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

Re: Address space tree deletion

Post by Support Team »

Hello,

First of all: We do not recommend to delete the addressspace manually and create it again manually. The nodes are defined by OPC foundation. Depending on the supported profile it is required by the OPC foundation to have subsets of the nodes in the addressspace.

If you want to delete the addressspace you can use the DeleteNodes method. This method deletes the node itself and its children that are defined by the TypeDefinition of the node.
There is no built in method to delete a subtree of nodes.


Best regards
Support Team

Post Reply