Code: Select all
Private Sub btnSendMDI_Click(sender As Object, e As EventArgs) Handles btnSendMDI.Click
Dim folderPath As String = "C:/cncm"
Dim filePath As String = System.IO.Path.Combine(folderPath, "MDI.txt")
System.IO.File.WriteAllText(filePath, txtMDI.Text)
SendJob(filePath)
End Sub
Code: Select all
Function SendJob(WhatFile As String)
' check that pipe is initialized
If CNCPipeManager.Pipe IsNot Nothing Then
If CNCPipeManager.Pipe.IsConstructed Then
Dim cmd As New CentroidAPI.CNCPipe.Job(CNCPipeManager.Pipe)
Return cmd.Load(WhatFile, "C:/cncm")
End If
End If
' if we failed, send back an unknown error
Return CentroidAPI.CNCPipe.ReturnCode.ERROR_UNKNOWN
End Function