Community

Question: Getting DPEs with dpNames patterns (solved)

28.04.2026 17:35 by Florian Andersen

Hi together,
I want the whole path to a particular DPE. I have the DP name and the name of the DPE but not the whole path. I don't know how deep the element is nested in the structure, e.g.
DP = "VALVE1"
DPE = "confirmedOpen"

The structure could be e.g.:
VALVE1.confirmedOpen
VALVE1.state.confirmedOpen
VALVE1.state.feedback.confirmedOpen

What I have tried was:
string pattern = "System1:*.*{.,}*{.,}confirmedOpen";
dyn_string dsDPEs = dpNames(pattern);

But I got this:
VALVE1.state.confirmedOpen
VALVE1.state.confirmedOpen
VALVE1.state.confirmedOpen
MOTVALVE1.state.feedback.confirmedOpen
MOTVALVE1.state.feedback.confirmedOpen
MOTVALVE1.state.feedback.confirmedOpen

My colleague came up with a simpler solution, which actually works as desired:
string pattern = "System1:*.**.confirmedOpen";
dyn_string dsDPEs = dpNames(pattern);

VALVE1.state.confirmedOpen
MOTVALVE1.state.feedback.confirmedOpen

Sadly, the manual does not really elaborate on the pattern options.
I hope this helps whoever might have the same problem.

BR Florian

This question has been edited.

Responses (0)

Log in to write a response to this question.
Back to list