EgtCAM5 :

- correzioni a MTable per gestire caso di macchina riferita e non esistente
- btl da linea di comando con soli 3 parametri (tolto nome CN)
- generazione programma CN con nome da info NcName di gruppo di lavoro.
This commit is contained in:
Dario Sassi
2019-01-31 12:10:02 +00:00
parent dcc16b1e27
commit 8dbecad9fa
7 changed files with 108 additions and 90 deletions
@@ -570,17 +570,22 @@ Public Class SimulationExpanderVM
If EgtGetModified() Then Return
End If
End If
Dim sCncFile As String = Path.ChangeExtension(sCurrFilePath, Nothing)
Dim sCncFile As String = ""
Dim sInfo As String = "EgtCAM5 - " & sCurrFilePath
If IniFile.m_bMachiningGroup Then
Dim sMGrpName As String = String.Empty
If EgtGetMachGroupName(EgtGetCurrMachGroup(), sMGrpName) Then
sCncFile &= "_" & sMGrpName & ".cnc"
sInfo &= "-" & sMGrpName
If EgtGetInfo( EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sCncFile) AndAlso Not String.IsNullOrWhiteSpace( sCncFile) then
sCncFile = Path.GetDirectoryName (sCurrFilePath) & "\" & sCncFile
else
sCncFile = Path.ChangeExtension(sCurrFilePath, Nothing)
If IniFile.m_bMachiningGroup Then
Dim sMGrpName As String = String.Empty
If EgtGetMachGroupName(EgtGetCurrMachGroup(), sMGrpName) Then
sCncFile &= "_" & sMGrpName & ".cnc"
sInfo &= "-" & sMGrpName
End If
Else
sCncFile &= ".cnc"
End If
Else
sCncFile &= ".cnc"
End If
End if
If Not EgtGenerate(sCncFile, sInfo) Then
If EgtGetLastMachMgrErrorId() <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString()
@@ -589,7 +594,7 @@ Public Class SimulationExpanderVM
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
End If
Else
Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, EgtMsg(MSG_SIMULATION + 32))
Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, EgtMsg(MSG_SIMULATION + 32) & " (" & sCncFile & ")")
End If
' Torno alla fase originale (o alla prima se non definita)
EgtSetCurrPhase(If(nPhase = 0, 1, nPhase), True)