- Регистрация
- 16.09.2011
- Сообщения
- 365
- Благодарностей
- 10
- Баллы
- 18
I only know how to change it myself to +1 or -1 I get errors if I simply replace with 0 in the same code.
I want a project that will reset the global variable to 0 in poster whatever number it was on.
Using the example c# global variables c code from rostonix's posted test template. This is the code for adding and substracting.
Actually it needs more work than jsut that as I want it so it reads a text file to get the name of the global variable i want to change in the code as well. because the variable will change. I just want it to reset whichever one i want to 0 to workaround me having to close the whole poster down to reset it.
I thought to use set value in variables processing but realised i wouldnt be able to change the variable using a text file that way since it uses the drop downs to choose.
I want a project that will reset the global variable to 0 in poster whatever number it was on.
Using the example c# global variables c code from rostonix's posted test template. This is the code for adding and substracting.
Код:
lock(SyncObject) {
var gbVar = project.GlobalVariables["[email protected]", "globVartumbp"];
gbVar.Value = Convert.ToInt32(gbVar.Value.ToString())+1;
project.Variables["currentValue"].Value = gbVar.Value.ToString();
}
I thought to use set value in variables processing but realised i wouldnt be able to change the variable using a text file that way since it uses the drop downs to choose.