I’m working on a project which uses a template array tag, and am looking for a method to initialize the entire array which doesn’t involve addressing each array element within a loop.
Can anyone tell me how this can be done?
Have you tried to use this column StartValue?
Let us know if it helps you please.
My apologies, as I should have explained further.
Startup initialization is fine, but I need to re-initialize repeatedly while the application is running.
I was hoping there would be a single function call to initialize the entire array whenever needed.
You have 2 methods for that:
OBS: “tagVet” is the array tag name. The codes in this message will be executed through a button.
1 - TK.InitializeTag(“tagVet”);
When executed it will make the values go to 0 for all the tags in the array.
2 - TK.ClearTag(“tagVet”);
When executed it will make the values go to the “StartValue” for all the tags in the array.
If you need something else, let us know.
Since starting this topic I’ve realised the significance of he Tool Kit (TK) class … so hopefully won’t be asking quite so many basic questions in future
I should add that some additional documentation showing examples of how to use the TK class members would be really appreciated. For someone new to FactoryStudio/.NET the current documentation doesn’t provide much guidance.
That’s good, but don’t hesitate to ask questions if you need something.
For TK class documentation you can access this link: