Запускает расчетную задачу пошагово ?.
ZCNTaskThermoCtrl (ZCNTaskThermo),
ZCNTaskHydroCtrl (ZCNTaskHydro),
Visual Basic:
Function RunStep(, bWait As Boolean
Метод запускает расчетну\
Пример кода на vbscript
' ActiveX enumeration values definitions start (do not change!) Const zcnNetTypeHydro = 2 ' ActiveX enumeration values definitions end Sub RunOnline Set Out = Zulu.OpenOutputChannel("Сообщения") Set nw = CreateObject("ZuluComNetOcx.Network") Set task = CreateObject("ZuluComNetOcx.TaskThermo") Out.Clear nw.OpenNetwork "D:\Lyosha\Orenburg\Оренбург_2026.b00", zcnNetTypeThermo task.Network = nw task.ReserveSetOutputLayer "D:\Test\ReserveOcx.b00", "ReserveOcx" task.SetOutput Out task.SetSource 144595, True task.CalibrSetFlags 1 task.Run 5, True End Sub Sub ChangeKe Set Out = Zulu.OpenOutputChannel("Сообщения") Set nw = CreateObject("ZuluComNetOcx.Network") Set task = CreateObject("ZuluComNetOcx.TaskHydro") Out.Clear nw.OpenNetwork "D:\Zulu 8.0\Examples\Hydro\Sample1\water supply.b00", zcnNetTypeHydro task.Network = nw 'task.SetOutput Out If task.StartStepCalc (0) = 0 Then Ke = 0.1 For j = 1 To 25 task.SetStepPipeValue 149, "Ke", Ke Ke = Ke + 1 task.RunStep 0 S = "Ke=" + CStr(Ke) + " P=" + CStr(task.GetStepNodeValue(198, "P")) + CHR(10) S = Replace (S, ",", ".") Out.Put S Next task.StopStepCalc End If End Sub Sub ChangeG Set Out = Zulu.OpenOutputChannel("Сообщения") Set nw = CreateObject("ZuluComNetOcx.Network") Set task = CreateObject("ZuluComNetOcx.TaskHydro") Out.Clear nw.OpenNetwork "D:\Hydro\Sample1\water supply.b00", zcnNetTypeHydro task.Network = nw 'task.SetOutput Out If task.StartStepCalc (0) = 0 Then G = 0.1 For j = 1 To 25 task.SetStepNodeValue 198, "G", G G = G + 1 task.RunStep 0 S = "G=" + CStr(task.GetStepPipeValue(149, "G")) + " G199=" + CStr(task.GetStepPipeValue(199, "G")) + " P=" + CStr(task.GetStepNodeValue(198, "P")) + CHR(10) S = Replace (S, ",", ".") Out.Put S Next task.StopStepCalc Out.Put "Finish" + CHR(10) End If End Sub