2How to set a value to all counter variables?

cesario678

Client
Регистрация
10.03.2022
Сообщения
171
Благодарностей
12
Баллы
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?
 

myndeswx

Client
Регистрация
15.05.2017
Сообщения
436
Благодарностей
104
Баллы
43
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

cesario678

Client
Регистрация
10.03.2022
Сообщения
171
Благодарностей
12
Баллы
18
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
 

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