Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b0e464e4b |
@@ -142,8 +142,33 @@ Public Class PhotoPageUC
|
|||||||
Dim sPhoto As String = m_sCurrDir & "\" & m_sCurrFile
|
Dim sPhoto As String = m_sCurrDir & "\" & m_sCurrFile
|
||||||
Dim sContour As String = String.Empty
|
Dim sContour As String = String.Empty
|
||||||
If m_MainWindow.m_Camera.GetCalcContour() Then
|
If m_MainWindow.m_Camera.GetCalcContour() Then
|
||||||
|
|
||||||
|
' ----------------------- LANCIO file Batch per eseguire codice Python -----------------------
|
||||||
|
Dim FileBatch As String = "C:\EgtData\OmagCUT\Temp\PostPhotoTemplate.bat"
|
||||||
|
If File.Exists(FileBatch) Then
|
||||||
|
Dim FileBatchCopy As String = "C:\EgtData\OmagCUT\Temp\PostPhoto.bat"
|
||||||
|
Try
|
||||||
|
IO.File.Delete(FileBatchCopy)
|
||||||
|
Catch ex As Exception
|
||||||
|
End Try
|
||||||
|
IO.File.Copy(FileBatch, FileBatchCopy)
|
||||||
|
Dim sFilePhoto As String = Path.GetDirectoryName(sPhoto) & "\" & Path.GetFileNameWithoutExtension(sPhoto)
|
||||||
|
IO.File.WriteAllText(FileBatchCopy, IO.File.ReadAllText(FileBatchCopy).Replace("£_FILE_IMAGE_£", sFilePhoto))
|
||||||
|
' Creo file Dxf del contorno
|
||||||
|
Dim RunPython As Process = Process.Start(FileBatchCopy)
|
||||||
|
While Not RunPython.HasExited
|
||||||
|
' Attendo che il processo sia terminato
|
||||||
|
System.Threading.Thread.Sleep(1000)
|
||||||
|
End While
|
||||||
|
Try
|
||||||
|
IO.File.Delete(FileBatchCopy)
|
||||||
|
Catch ex As Exception
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
' ----------------------- LANCIO file Batch per eseguire codice Python -----------------------
|
||||||
|
|
||||||
sContour = Path.ChangeExtension(sPhoto, "dxf")
|
sContour = Path.ChangeExtension(sPhoto, "dxf")
|
||||||
End If
|
End If
|
||||||
m_MainWindow.m_CadCutPageUC.PostPhoto(sPhoto, sContour)
|
m_MainWindow.m_CadCutPageUC.PostPhoto(sPhoto, sContour)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Reference in New Issue
Block a user