Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim GornjaGranica As Single
- Dim DonjaGranica As Single
- Dim oExcel As Object
- Dim oBook As Object
- Dim oSheet As Object
- Dim MSWord As Object
- Dim oDoc As Object
- Dim oPara1 As Object
- Private Sub AlarmSummaryOCX1_AlarmAck()
- End Sub
- Private Sub CFixPicture_Initialize()
- Fix32.Fix.VENTIL.F_CV = False
- Fix32.Fix.PUMPA.F_CV = False
- Fix32.Fix.NIVO_REZERVOARA = 25
- Combo_Load
- End Sub
- Private Sub DGButton_Click()
- DonjaGranica = CSng(DGBox.Text)
- End Sub
- Private Sub ExcelButton_Click()
- 'Start a new workbook in Excel
- Set oExcel = CreateObject("Excel.Application")
- oExcel.Visible = True
- Set oBook = oExcel.Workbooks.Add
- 'Add data to cells of the first worksheet in the new workbook
- Set oSheet = oBook.Worksheets(1)
- oSheet.Range("A1").Value = "Nivo rezervoara"
- oSheet.Range("B1").Value = Fix32.Fix.NIVO_REZERVOARA.F_CV
- 'Save the Workbook and Quit Excel
- oBook.SaveAs "C:\Book1.xls"
- oExcel.Quit
- End Sub
- Private Sub GGButton_Click()
- GornjaGranica = CSng(GGBox.Text)
- End Sub
- Private Sub RezimBox_Click()
- If RezimBox.ListIndex = 0 Then
- TextBox3.Text = "Automatski"
- Else
- TextBox3.Text = "Rucni"
- End If
- End Sub
- Private Sub Combo_Load()
- RezimBox.AddItem "Automatski"
- RezimBox.AddItem "Rucni"
- End Sub
- Private Sub CFixPicture_KeyDown(ByVal KeyCode As Long, ByVal Shift As Long, ContinueProcessing As Boolean)
- End Sub
- Private Sub PipeHorz2_Edit()
- frmPipes.InitializeDynamo PipeHorz2
- frmPipes.Show
- End Sub
- Private Sub PipeHorz1_Edit()
- frmPipes.InitializeDynamo PipeHorz1
- frmPipes.Show
- End Sub
- Private Sub PipeVert3_Edit()
- frmPipes.InitializeDynamo PipeVert3
- frmPipes.Show
- End Sub
- Private Sub PipeVert2_Edit()
- frmPipes.InitializeDynamo PipeVert2
- frmPipes.Show
- End Sub
- Private Sub PumpCentrifugalAnimA1_Click()
- 'The Comments below have been added automatically.
- 'Any changes could cause adverse effects to the functionality
- 'of the Script Authoring Experts.
- 'WizardName=ToggleDigitalPoint
- 'Property1=Fix32.FIX.PUMPA.F_CV
- 'Property2=False
- ToggleDigitalPoint "Fix32.FIX.PUMPA.F_CV"
- End Sub
- Private Sub Tajmer_OnTimeOut(ByVal lTimerId As Long)
- If RezimBox.Value = "Automatski" Then
- Radi
- Automatski
- ElseIf RezimBox.Value = "Rucni" Then
- Radi
- Rucni
- End If
- End Sub
- Private Sub Rucni()
- If Fix32.Fix.NIVO_REZERVOARA.F_CV < DonjaGranica Then
- Fix32.Fix.PUMPA.F_CV = True
- Fix32.Fix.VENTIL.F_CV = False
- ElseIf Fix32.Fix.NIVO_REZERVOARA.F_CV > GornjaGranica Then
- Fix32.Fix.PUMPA.F_CV = False
- Fix32.Fix.VENTIL.F_CV = True
- End If
- End Sub
- Private Sub Automatski()
- If Fix32.Fix.NIVO_REZERVOARA.F_CV < 7.5 Then
- Fix32.Fix.PUMPA.F_CV = True
- Fix32.Fix.VENTIL.F_CV = False
- ElseIf Fix32.Fix.NIVO_REZERVOARA.F_CV > 42.5 Then
- Fix32.Fix.PUMPA.F_CV = False
- Fix32.Fix.VENTIL.F_CV = True
- End If
- End Sub
- Private Sub Radi()
- If Fix32.Fix.PUMPA.F_CV And Fix32.Fix.VENTIL.F_CV = False Then
- Fix32.Fix.NIVO_REZERVOARA.F_CV = Fix32.Fix.NIVO_REZERVOARA.F_CV + 2
- ElseIf Fix32.Fix.PUMPA.F_CV And Fix32.Fix.VENTIL.F_CV Then
- Fix32.Fix.NIVO_REZERVOARA.F_CV = Fix32.Fix.NIVO_REZERVOARA.F_CV - 2
- ElseIf Fix32.Fix.PUMPA.F_CV = False And Fix32.Fix.VENTIL Then
- Fix32.Fix.NIVO_REZERVOARA.F_CV = Fix32.Fix.NIVO_REZERVOARA.F_CV - 4
- Else
- Fix32.Fix.PUMPA.F_CV = True
- End If
- End Sub
- Private Sub TextBox3_Change()
- End Sub
- Private Sub TrendButton_Click()
- 'The Comments below have been added automatically.
- 'Any changes could cause adverse effects to the functionality
- 'of the Script Authoring Experts.
- 'WizardName=OpenPicture
- 'Property1=priprema_kol1_hist.grf
- 'Property2=
- 'Property3=False
- 'Property4=
- 'Property5=
- 'Property6=False
- 'Property7=
- 'Property8=False
- OpenPicture "priprema_kol1_hist.grf", "", "", ""
- End Sub
- Private Sub ValveHorizontalOnOff1_Click()
- 'The Comments below have been added automatically.
- 'Any changes could cause adverse effects to the functionality
- 'of the Script Authoring Experts.
- 'WizardName=ToggleDigitalPoint
- 'Property1=Fix32.FIX.VENTIL.F_CV
- 'Property2=False
- ToggleDigitalPoint "Fix32.FIX.VENTIL.F_CV"
- End Sub
- Private Sub ValveHorizontalOnOff1_Edit()
- frmValveColorAnim.InitializeDynamo ValveHorizontalOnOff1
- frmValveColorAnim.Show
- End Sub
- Private Sub PipeSqrElbowUL1_Edit()
- frmPipes.InitializeDynamo PipeSqrElbowUL1
- frmPipes.Show
- End Sub
- Private Sub PipeVert1_Edit()
- frmPipes.InitializeDynamo PipeVert1
- frmPipes.Show
- End Sub
- Private Sub TankBatchE1_Edit()
- frmTankAnim.InitializeDynamo TankBatchE1
- frmTankAnim.Show
- End Sub
- Private Sub PumpCentrifugalAnimA1_Edit()
- frmPumpAnim.InitializeDynamo PumpCentrifugalAnimA1
- frmPumpAnim.Show
- End Sub
- Private Sub PipeSqrElbowUR1_Edit()
- frmPipes.InitializeDynamo PipeSqrElbowUR1
- frmPipes.Show
- End Sub
- Private Sub PipeRndElbowLL1_Edit()
- frmPipes.InitializeDynamo PipeRndElbowLL1
- frmPipes.Show
- End Sub
- Private Sub WordButton_Click()
- Set MSWord = CreateObject("Word.Application")
- Set oDoc = MSWord.Documents.Add
- MSWord.Visible = True
- Set oPara1 = oDoc.Content.Paragraphs.Add
- oPara1.Range.Text = "Nivo rezervoara " + CStr(Fix32.Fix.NIVO_REZERVOARA.F_CV)
- oPara1.Range.Font.Bold = True
- oDoc.SaveAs "C:\Kol1.doc"
- MSWord.Quit
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment