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.
Address space tree deletion
Moderator: uasdknet
- Support Team
- Hero Member
- Posts: 3072
- Joined: 18 Mar 2011, 15:09
Re: Address space tree deletion
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
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