dpSetAlias for multiple DPE

Find and share HowTos to various installations / configurations!
2 posts • Page 1 of 1
alaralum
Posts:22
Joined: Mon Jan 09, 2017 9:56 am

dpSetAlias for multiple DPE

Post by alaralum »

Hi,
before updating our datapoints, we would like to "reset" the alias from every DPE to avoid conflicts with the new update.
The way building a loop doing a "dpSetAlias(dpe, "") " to all of the available DPEs seems to be not much performant as it is doing individual dpSets many times.

for (j = 2; j <= dynlen(queryResult); j++)
{
sDPEname=queryResult[j][1];
dpSetAlias(sDPEname,"");
}

Is there any way to provide a dyn_string to do that with only a call (like dpSetAlias(dyn_string, dyn_string)

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: dpSetAlias for multiple DPE

Post by leoknipp »

The documentation gives the information that using dyn arrays is not possible for dpSetAlias().
If you want to check if an alias is already defined you can call dpGetAllAliases() with a search pattern for the alias.
Based on the result of the function you can check if there is a need to delete an alias at a specific element.

Best Regards
Leopold Knipp
Senior Support Specialist

2 posts • Page 1 of 1