Hello, I want to add an operator or amount of operators into a Time Table using code.
I developed this code, but when I run it, I saw that the values are the tree is not the same as if I would use the GUI. This is the code:
treenode Operator = Model.find("Operator1"); treenode OpTimeTable = getvarnode(Operator, "timetables"); string OpName = Operator.name; treenode TimeTableNode = Model.find("Tools/TimeTables/TimeTable1"); treenode TTMembers = getvarnode(TimeTableNode, "members"); string TTName = TimeTableNode.name; TTMembers.subnodes.assert(OpName,OpTimeTable); treenode NewMember = TTMembers.subnodes[OpName]; OpTimeTable.subnodes.assert(TTName,NewMember);
If you have a different & proper way to assign the time tables to the operators I would appreciate it.
Thanks.
Manuel Sinco.