EgtDOORProbe :

- Aggiunta cancellazione vecchi file prima di fare copia, ed attivata sovrascrittura.
This commit is contained in:
Emmanuele Sassi
2018-10-08 07:26:16 +00:00
parent cd49c334f4
commit 8b10edd83c
2 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -60,5 +60,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.9.9.4")>
<Assembly: AssemblyFileVersion("1.9.9.4")>
<Assembly: AssemblyVersion("1.9.9.5")>
<Assembly: AssemblyFileVersion("1.9.9.5")>
+4 -3
View File
@@ -269,7 +269,8 @@ Public Class ProbingPanelVM
SetStatus("Start recalculating door from probe dimensions")
' copio file probe data in cartella ddf
Try
File.Copy(DataFile, Path.GetDirectoryName(m_DDFPath) & "\" & "Data.dat")
File.Delete(Path.GetDirectoryName(m_DDFPath) & "\" & "Data.dat")
File.Copy(DataFile, Path.GetDirectoryName(m_DDFPath) & "\" & "Data.dat", True)
Catch ex As Exception
SetStatus("Error in copying the Probe Data File to the PC")
Return
@@ -326,7 +327,7 @@ Public Class ProbingPanelVM
File.Delete(Path.ChangeExtension(NcFilePath, ".prb"))
File.Delete(Path.ChangeExtension(NcFilePath, ".cnc"))
System.Threading.Thread.Sleep(100)
File.Copy(Path.ChangeExtension(m_DDFPath, ".cnc"), NcFilePath)
File.Copy(Path.ChangeExtension(m_DDFPath, ".cnc"), NcFilePath, True)
SetStatus("Part program copied to the CNC, activate it and start the machine")
Catch ex As Exception
SetStatus("Error in copying the Part Program to the CNC")
@@ -544,7 +545,7 @@ Public Class ProbingPanelVM
File.Delete(Path.ChangeExtension(NcFilePath, ".prb"))
File.Delete(Path.ChangeExtension(NcFilePath, ".cnc"))
System.Threading.Thread.Sleep(100)
File.Copy(Path.ChangeExtension(m_DDFPath, GenFileExtension), NcFilePath)
File.Copy(Path.ChangeExtension(m_DDFPath, GenFileExtension), NcFilePath, True)
SetStatus(sProgramMsg & " copied to the CNC, activate it and start the machine")
Catch ex As Exception
SetStatus("Error in copying the " & sProgramMsg & " to the CNC")