OmagCUT 2.7l2 :
- correzioni al salvataggio del setup stile CAM5.
This commit is contained in:
+31
-21
@@ -1099,34 +1099,44 @@ Public Class SetUpPage
|
||||
EgtTdbSave()
|
||||
End Sub
|
||||
|
||||
' Funzione di utilità per la successiva
|
||||
Private Sub AddOneSetUpPos( nPosInd As Integer, sPosName As String, sToolName As String, ByRef sFileContent As String)
|
||||
If String.IsNullOrEmpty(sToolName) Then
|
||||
' Aggiungo la posizione vuota
|
||||
sFileContent &= "Pos" & nPosInd.ToString & "=" & sPosName & vbCrLf
|
||||
Else
|
||||
EgtTdbSetCurrTool(sToolName)
|
||||
' Recupero l'uscita
|
||||
Dim nExit As Integer = 1
|
||||
EgtTdbGetCurrToolParam(MCH_TP.EXIT_, nExit)
|
||||
' Recupero la testa
|
||||
Dim sHead As String = ""
|
||||
EgtTdbGetCurrToolParam(MCH_TP.HEAD, sHead)
|
||||
' Recupero identificativo UUID dell'utensile
|
||||
Dim sUUID As String = ""
|
||||
EgtTdbGetCurrToolParam(MCH_TP.UUID, sUUID)
|
||||
' Aggiungo la posizione con i dati utensile
|
||||
sFileContent &= "Pos" & nPosInd.ToString & "=" & sPosName & ";" & sHead & ";" & nExit.ToString & "/" & sUUID & "/" & sToolName & vbCrLf
|
||||
End If
|
||||
End Sub
|
||||
' Funzione che genera il file di setup corrente (per Cam5 e Office)
|
||||
Private Sub SaveSetUpFile()
|
||||
If m_CurrMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then Return
|
||||
Dim sContentFile As String = EgtMsg(91239) & vbCrLf ' ; this file has been created by program OmagCUT by current setup
|
||||
sContentFile &= EgtMsg(91240) & vbCrLf ' [General]
|
||||
Dim sFileContent As String = "; this file has been created by program OmagCUT by current setup" & vbCrLf
|
||||
sFileContent &= "[General]" & vbCrLf
|
||||
Dim nPosition As Integer = 0
|
||||
For Each ToolPosition As ToolChangerPos In m_CurrMachine.ToolChanger
|
||||
Dim sToolName As String = ToolPosition.sTool
|
||||
Dim sPositionName As String = ToolPosition.sName
|
||||
Dim sPosition As Integer = ToolPosition.nPosition
|
||||
If Not String.IsNullOrEmpty(sToolName) Then
|
||||
EgtTdbSetCurrTool(sToolName)
|
||||
' Recupero l'uscita
|
||||
Dim nExit As Integer = 1
|
||||
EgtTdbGetCurrToolParam(MCH_TP.EXIT_, nExit)
|
||||
' Recupero la testa
|
||||
Dim sHead As String = ""
|
||||
EgtTdbGetCurrToolParam(MCH_TP.HEAD, sHead)
|
||||
' Recupero nome file nge dell'utensile
|
||||
Dim sUUID As String = ""
|
||||
EgtTdbGetCurrToolParam(MCH_TP.UUID, sUUID)
|
||||
'local sRaw='Pos'..tostring(Index)..'='..TcPos..';'..EgtTdbGetCurrToolParam( MCH_TP.HEAD)..';'..EgtTdbGetCurrToolParam( MCH_TP.EXIT)..'/'..EgtTdbGetCurrToolParam( MCH_TP.UUID)..'/'..ToolName
|
||||
sContentFile &= "Pos" & sPosition.ToString & "=" & sPositionName & ";" & sHead & ";" & nExit.ToString & "/" & sUUID & "/" & sToolName & vbCrLf
|
||||
End If
|
||||
nPosition += 1
|
||||
AddOneSetUpPos( nPosition, ToolPosition.sName, ToolPosition.sTool, sFileContent)
|
||||
Next
|
||||
For Each ToolPosition As ToolChangerPos In m_CurrMachine.ManualToolChanger
|
||||
nPosition += 1
|
||||
AddOneSetUpPos( nPosition, ToolPosition.sName, ToolPosition.sTool, sFileContent)
|
||||
Next
|
||||
' Apro il file e lo sovrascrivo
|
||||
Dim sFileOmagCutSetUp As String = m_CurrMachine.sMachDir & "\SetUp\CurrOmagCUT.stu"
|
||||
Dim sSetUpFile As String = m_CurrMachine.sMachDir & "\SetUp\CurrOmagCUT.stu"
|
||||
Try
|
||||
My.Computer.FileSystem.WriteAllText(sFileOmagCutSetUp, sContentFile, False)
|
||||
My.Computer.FileSystem.WriteAllText(sSetUpFile, sFileContent, False)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error in creatinf file CurrOmagCUT.stu: " & ex.ToString)
|
||||
End Try
|
||||
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.7.12.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.12.1")>
|
||||
<Assembly: AssemblyVersion("2.7.12.2")>
|
||||
<Assembly: AssemblyFileVersion("2.7.12.2")>
|
||||
|
||||
Reference in New Issue
Block a user