"We've decided to apply a 'System Owner' Element Custom Property for all elements in our DMS.
With over 10,000 elements, individually editing the custom property is challenging.
Is there a way to select multiple elements and apply this custom property all at once? I'm exploring options similar to 'Multiple Set' in Cube for an easier solution."
Hi Kawssar,
I believe there is no option similar to 'multiple set' for properties. A possible option could be using a small automation script. There is already a method that you could use to set properties (SetPropertyValue). The workflow could be as follows:
- Get all the elements where you would like to set the property (you can see all available methods here)
- For each element, use the method SetPropertyValue to set the corresponding value.
Hope it helps.
Hi Kawssar,
I believe the FindElementByName should fit perfectly in your use case
https://docs.dataminer.services/develop/api/types/Skyline.DataMiner.Automation.IEngine.FindElementsByName.html
You can see in the remarks section that it does support wildcards to retrieve multiple elements that match.
I’ve successfully created a script to add Element Custom Properties, but it operates element by element based on the input element ID to the script.
I’m still exploring the elements filtering options you provided in the link. If I can filter elements by using a wildcard included in the element name, such as “VSM,” “icon,” or “IRD,” that would be immensely helpful.
————————————————————————————-
public class Script
{
public void Run(IEngine engine)
{
Element element = engine.FindElement(101709 ,468);
element.SetPropertyValue(“System Owner”, “DOH-BSS”);
}
}