Changing linked property of a inserted symbol c#
Hi,
So I'm currently working on a project for auto generated variable, screens etc. and I'm able to insert a symbol into the screen specified with my add-in, but I can't seem to find the correct way to change my linked property for a button.
Example:
My code:
var navSymbolBtn = myScreenRenamed.ScreenElementCollection.Create("Tile_" + symbolName, Scada.AddIn.Contracts.ScreenElement.ElementType.Symbol);
navSymbolBtn.SetDynamicProperty("LinkName", "Tile");
navSymbolBtn.SetDynamicProperty("GraphicSize", "0");
navSymbolBtn.SetDynamicProperty("SubstituteSource", "*xxxx_Mxx*");
navSymbolBtn.SetDynamicProperty("SubstituteDestination", symbolName);
navSymbolBtn.SetDynamicProperty("ExpProps[8].ExpPropValue.Function", "screenSwitch_M01");
navSymbolBtn.Top = 0;
navSymbolBtn.Left = 10;
Everything works except for "navSymbolBtn.SetDynamicProperty("ExpProps[8].ExpPropValue.Function", "screenSwitch_M01");". And yes the function exists beforehand.
Can anyone guide me in the right direction?
Thanks :)
Br
Thomas
This is a migrated post! Originally posted on 30.03.2022 by user Tduck82. Please be aware that information can be outdated.