2How to set a value to all counter variables?

  • Автор темы Автор темы cesario678
  • Дата начала Дата начала

cesario678

Client
Регистрация
10.03.2022
Сообщения
227
Реакции
13
Баллы
18
I have hundreds of variables (counters) within my project. When I use the function (clear variable), it deletes everything instead of setting the value to (0). How do I assign the value (0) to all variables (counters) instead of having to do it one by one?
 
Maybe instead of clearing the variables and starting again just end the project and new one would start with fresh counters?
Other than that there's not much you can do. It would be easier to use C# to set everything back in one place instead of using 100s of cubes

C#:
Развернуть Свернуть Копировать
 project.Variables["counter1"].Value = "0";
 project.Variables["counter2"].Value = "0";
 project.Variables["counter3"].Value = "0";
 
  • Спасибо
Реакции: cesario678
Maybe instead of clearing the variables and starting again just end the project and new one would start with fresh counters?
Other than that there's not much you can do. It would be easier to use C# to set everything back in one place instead of using 100s of cubes

C#:
Развернуть Свернуть Копировать
 project.Variables["counter1"].Value = "0";
project.Variables["counter2"].Value = "0";
project.Variables["counter3"].Value = "0";
Thanks
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)