Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a37686962d | |||
| 854cd2a937 | |||
| 73ede8520a | |||
| fb3a53be59 | |||
| af8fbf8a3d | |||
| a2da16761f | |||
| 7f964cd55b | |||
| 95a1cc8f3c | |||
| 1f654dc708 | |||
| 09baa238d8 |
@@ -7,6 +7,9 @@
|
||||
|
||||
Public Const K_NCTYPE As String = "NCType"
|
||||
Public Const K_CONNECTIONSTRING As String = "ConnectionString"
|
||||
Public Const K_SUPERVISOR As String = "Supervisor"
|
||||
Public Const K_SAVECNCPATH As String = "SaveCncPath"
|
||||
Public Const K_SAVEEXT As String = "SaveExt"
|
||||
|
||||
Public Const S_CHANNELS As String = "Channels"
|
||||
|
||||
|
||||
@@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.7.1.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.1.1")>
|
||||
<Assembly: AssemblyVersion("2.7.4.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.4.1")>
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.7.1.1")]
|
||||
[assembly: AssemblyFileVersion("2.7.1.1")]
|
||||
[assembly: AssemblyVersion("2.7.4.1")]
|
||||
[assembly: AssemblyFileVersion("2.7.4.1")]
|
||||
|
||||
@@ -248,8 +248,8 @@ Public Class MainWindowM
|
||||
EgtSetLockId( sLockId)
|
||||
End If
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2701, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2701, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2704, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2704, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & SUPGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
|
||||
@@ -70,5 +70,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.7.1.2")>
|
||||
<Assembly: AssemblyFileVersion("2.7.1.2")>
|
||||
<Assembly: AssemblyVersion("2.7.4.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.4.1")>
|
||||
|
||||
@@ -61,7 +61,9 @@ Public Class MySceneHostVM
|
||||
' Imposto direttorio ausiliario per import/gestione BTL
|
||||
Dim sBtlAuxDir As String = String.Empty
|
||||
GetMainPrivateProfileString(S_IMPORT, K_BTLAUXDIR, "", sBtlAuxDir)
|
||||
EgtSetBtlAuxDir(sBtlAuxDir)
|
||||
If Not EgtSetBtlAuxDir(sBtlAuxDir) Then
|
||||
EgtOutLog("Missing BtlAuxDir path! Will be impossible to load Variant!")
|
||||
End If
|
||||
' inizializzo gestore travi e pareti
|
||||
EgtInitBeamMgr(EIB_FL.TS3_POS + EIB_FL.USEUATTR)
|
||||
' inizializzo gestore lavorazioni
|
||||
|
||||
@@ -928,8 +928,15 @@ Public Class LeftPanelVM
|
||||
Case MCH_CR.BR
|
||||
dPosX = WallMachGroup.dL - PartToAdd.dL - dPosX
|
||||
End Select
|
||||
' calcolo box del pezzo e del suo layer box per compensare la eventuale differenza
|
||||
Dim b3Part As New BBox3d
|
||||
EgtGetBBoxGlob(nPartDuploId, GDB_BB.STANDARD, b3Part)
|
||||
Dim b3Box As New BBox3d
|
||||
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(nPartDuploId, "Box")
|
||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
||||
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min
|
||||
' aggiungo il pezzo al grezzo
|
||||
If EgtAddPartToRawPart(nPartDuploId, New Point3d(dPosX, dPosY, 0), WallMachGroup.MyMachGroupM.nRawPartId) Then
|
||||
If EgtAddPartToRawPart(nPartDuploId, New Point3d(dPosX - vtDeltaBox.x, dPosY - vtDeltaBox.y, 0 - vtDeltaBox.z), WallMachGroup.MyMachGroupM.nRawPartId) Then
|
||||
EgtSetInfo(nPartDuploId, MGR_PRT_POSX, dPosX)
|
||||
EgtSetInfo(nPartDuploId, MGR_PRT_POSY, dPosY)
|
||||
EgtSetInfo(nPartDuploId, MGR_PRT_ROT, PartToAdd.nROTATED)
|
||||
|
||||
@@ -213,7 +213,7 @@ Public Class PartVM
|
||||
' calcolo distanza tra i box
|
||||
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min
|
||||
' reinserisco il pezzo nel grezzo
|
||||
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0), ParentMachGroupVM.MyMachGroupM.nRawPartId)
|
||||
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0 - vtDeltaBox.z), ParentMachGroupVM.MyMachGroupM.nRawPartId)
|
||||
' lo riseleziono
|
||||
EgtSelectObj(nPartId)
|
||||
' resetto validazione del pezzo
|
||||
|
||||
@@ -242,8 +242,8 @@ Public Class MainWindowM
|
||||
EgtSetLockId( sLockId)
|
||||
End If
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2701, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2701, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2704, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2704, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
|
||||
@@ -70,5 +70,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.7.1.2")>
|
||||
<Assembly: AssemblyFileVersion("2.7.1.2")>
|
||||
<Assembly: AssemblyVersion("2.7.4.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.4.1")>
|
||||
|
||||
@@ -611,27 +611,32 @@ Public Class ProdManagerVM
|
||||
''' </summary>
|
||||
Friend Sub GoToSupervisor()
|
||||
If IsNothing(m_CurrProd) Then Return
|
||||
' apro supervisore
|
||||
Dim sSupervisorName As String = "EgtBEAMWALL.SupervisorR32"
|
||||
' recupero processo del supervisore
|
||||
Dim localProc As Process() = Process.GetProcessesByName(sSupervisorName)
|
||||
If localProc.Length > 0 Then
|
||||
For Each p As Process In localProc
|
||||
' porto in primo piano il Supervisor
|
||||
BringWindowToFront(p.MainWindowHandle)
|
||||
Exit For
|
||||
Next
|
||||
' verifico se modalita' supervisore attiva
|
||||
If GetPrivateProfileInt(S_GENERAL, K_SUPERVISOR, 1, CurrentMachine.sMachIniFile) = 1 Then
|
||||
' apro supervisore
|
||||
Dim sSupervisorName As String = "EgtBEAMWALL.SupervisorR32"
|
||||
' recupero processo del supervisore
|
||||
Dim localProc As Process() = Process.GetProcessesByName(sSupervisorName)
|
||||
If localProc.Length > 0 Then
|
||||
For Each p As Process In localProc
|
||||
' porto in primo piano il Supervisor
|
||||
BringWindowToFront(p.MainWindowHandle)
|
||||
Exit For
|
||||
Next
|
||||
Else
|
||||
Dim sSupervisorPath As String = Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory) & "\" & sSupervisorName & ".exe"
|
||||
Try
|
||||
Process.Start(sSupervisorPath, "1 " & CurrProd.nProdId)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error: impossible starting supervisor from path " & sSupervisorPath)
|
||||
End Try
|
||||
End If
|
||||
' mando richiesta di apertura progetto in supervisore
|
||||
'Dim x = DbControllers.m_StatusMapController.GetProd
|
||||
DbControllers.m_StatusMapController.UpdateAction(DbControllers.m_SupervisorId, Map.refProdManagerVM.CurrProd.nProdId, Map.refProdManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ChangeProdInSupervisorRequest, "")
|
||||
Else
|
||||
Dim sSupervisorPath As String = Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory) & "\" & sSupervisorName & ".exe"
|
||||
Try
|
||||
Process.Start(sSupervisorPath, "1 " & CurrProd.nProdId)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error: impossible starting supervisor from path " & sSupervisorPath)
|
||||
End Try
|
||||
MessageBox.Show("Supervisor is not available for this machine!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
' mando richiesta di apertura progetto in supervisore
|
||||
'Dim x = DbControllers.m_StatusMapController.GetProd
|
||||
DbControllers.m_StatusMapController.UpdateAction(DbControllers.m_SupervisorId, Map.refProdManagerVM.CurrProd.nProdId, Map.refProdManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ChangeProdInSupervisorRequest, "")
|
||||
End Sub
|
||||
|
||||
#End Region ' GoToSupervisor
|
||||
|
||||
@@ -1484,7 +1484,13 @@ Public Class ProjManagerVM
|
||||
' creo cartella temporanea di estrazione in Temp
|
||||
Dim sProjectimportDir As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\ProjectImport"
|
||||
If Directory.Exists(sProjectimportDir) Then
|
||||
Directory.Delete(sProjectimportDir, True)
|
||||
Try
|
||||
Directory.Delete(sProjectimportDir, True)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Delete old import project failed!")
|
||||
MessageBox.Show("Importazione Fallita!", "Errore", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
End Try
|
||||
End If
|
||||
Directory.CreateDirectory(sProjectimportDir)
|
||||
Try
|
||||
|
||||
@@ -68,7 +68,9 @@ Public Class MySceneHostVM
|
||||
' Imposto direttorio ausiliario per import/gestione BTL
|
||||
Dim sBtlAuxDir As String = String.Empty
|
||||
GetMainPrivateProfileString(S_IMPORT, K_BTLAUXDIR, "", sBtlAuxDir)
|
||||
EgtSetBtlAuxDir(sBtlAuxDir)
|
||||
If Not EgtSetBtlAuxDir(sBtlAuxDir) Then
|
||||
EgtOutLog("Missing BtlAuxDir path! Will be impossible to load Variant!")
|
||||
End If
|
||||
' inizializzo gestore travi e pareti
|
||||
EgtInitBeamMgr(EIB_FL.TS3_POS + EIB_FL.USEUATTR)
|
||||
' inizializzo gestore lavorazioni
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
@@ -240,8 +241,32 @@ Public Class TopPanelVM
|
||||
Map.refCALCPanelVM.Verify()
|
||||
Return
|
||||
End If
|
||||
If Not Produce(Map.refMachGroupPanelVM.SelectedMachGroup, ErrorMsg) AndAlso Not String.IsNullOrWhiteSpace(ErrorMsg) Then
|
||||
MessageBox.Show(ErrorMsg)
|
||||
' verifico se modalita' supervisore attiva
|
||||
If GetPrivateProfileInt(S_GENERAL, K_SUPERVISOR, 1, CurrentMachine.sMachIniFile) = 1 Then
|
||||
If Not Produce(Map.refMachGroupPanelVM.SelectedMachGroup, ErrorMsg) AndAlso Not String.IsNullOrWhiteSpace(ErrorMsg) Then
|
||||
MessageBox.Show(ErrorMsg)
|
||||
End If
|
||||
Else
|
||||
' altrimenti lo copio se path disponibile
|
||||
If Map.refMachGroupPanelVM.SelectedMachGroup.nGlobalState = CalcStates.OK Or Map.refMachGroupPanelVM.SelectedMachGroup.nGlobalState = CalcStates.INFO Then
|
||||
Dim sSaveCncPath As String = ""
|
||||
GetPrivateProfileString(S_GENERAL, K_SAVECNCPATH, "", sSaveCncPath, CurrentMachine.sMachIniFile)
|
||||
Dim sSaveExt As String = ""
|
||||
GetPrivateProfileString(S_GENERAL, K_SAVEEXT, "", sSaveExt, CurrentMachine.sMachIniFile)
|
||||
If String.IsNullOrWhiteSpace(sSaveExt) Then
|
||||
sSaveExt = ".cnc"
|
||||
ElseIf sSaveExt(0) <> "." Then
|
||||
sSaveExt = "." & sSaveExt
|
||||
End If
|
||||
Try
|
||||
Dim sMachGroupFilePath As String = Map.refProdManagerVM.CurrProd.sProdDirPath & "\" & Map.refMachGroupPanelVM.SelectedMachGroup.Name.ToString() & ".cnc"
|
||||
Dim sNewPath As String = sSaveCncPath & "\" & Map.refProdManagerVM.CurrProd.sProdId & "-" & Map.refMachGroupPanelVM.SelectedMachGroup.Name.ToString() & sSaveExt
|
||||
File.Copy(sMachGroupFilePath, sNewPath, True)
|
||||
MessageBox.Show(String.Format("File copied! You can find it at {0}", {sNewPath}), "Info", MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
Catch ex As Exception
|
||||
MessageBox.Show(String.Format("Copy to {0} folder failed!", {sSaveCncPath}), "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -306,12 +331,43 @@ Public Class TopPanelVM
|
||||
End If
|
||||
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 0 Then
|
||||
Dim MachgroupErrorList As New List(Of MachGroupVM)
|
||||
Dim sErrorMessage As String = ""
|
||||
Dim bErrorMessage As Boolean = False
|
||||
For Each Machgroup In Map.refMachGroupPanelVM.MachGroupVMList
|
||||
Dim ErrorMsg As String = ""
|
||||
If Not Produce(Machgroup, ErrorMsg) AndAlso Not String.IsNullOrWhiteSpace(ErrorMsg) Then
|
||||
MachgroupErrorList.Add(Machgroup)
|
||||
' verifico se modalita' supervisore attiva
|
||||
If GetPrivateProfileInt(S_GENERAL, K_SUPERVISOR, 1, CurrentMachine.sMachIniFile) = 1 Then
|
||||
Dim ErrorMsg As String = ""
|
||||
If Not Produce(Machgroup, ErrorMsg) AndAlso Not String.IsNullOrWhiteSpace(ErrorMsg) Then
|
||||
MachgroupErrorList.Add(Machgroup)
|
||||
End If
|
||||
Else
|
||||
' altrimenti lo copio se path disponibile
|
||||
If Map.refMachGroupPanelVM.SelectedMachGroup.nGlobalState = CalcStates.OK Or Map.refMachGroupPanelVM.SelectedMachGroup.nGlobalState = CalcStates.INFO Then
|
||||
Dim sSaveCncPath As String = ""
|
||||
GetPrivateProfileString(S_GENERAL, K_SAVECNCPATH, "", sSaveCncPath, CurrentMachine.sMachIniFile)
|
||||
Dim sSaveExt As String = ""
|
||||
GetPrivateProfileString(S_GENERAL, K_SAVEEXT, "", sSaveExt, CurrentMachine.sMachIniFile)
|
||||
If String.IsNullOrWhiteSpace(sSaveExt) Then
|
||||
sSaveExt = ".cnc"
|
||||
ElseIf sSaveExt(0) <> "." Then
|
||||
sSaveExt = "." & sSaveExt
|
||||
End If
|
||||
If String.IsNullOrWhiteSpace(sSaveCncPath) OrElse Not Directory.Exists(sSaveCncPath) Then Return
|
||||
Try
|
||||
Dim sMachGroupFilePath As String = Map.refProdManagerVM.CurrProd.sProdDirPath & "\" & Machgroup.Name.ToString() & ".cnc"
|
||||
Dim sNewPath As String = sSaveCncPath & "\" & Map.refProdManagerVM.CurrProd.sProdId & "-" & Machgroup.Name.ToString() & sSaveExt
|
||||
File.Copy(sMachGroupFilePath, sNewPath, True)
|
||||
sErrorMessage &= String.Format("File copied! You can find it at {0}", {sNewPath}) & Environment.NewLine
|
||||
Catch ex As Exception
|
||||
sErrorMessage &= String.Format("Copy to {0} folder failed!", {sSaveCncPath}) & Environment.NewLine
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If Not String.IsNullOrWhiteSpace(sErrorMessage) Then
|
||||
sErrorMessage = "Results for all the parts generated:" & Environment.NewLine & sErrorMessage
|
||||
MessageBox.Show(sErrorMessage, If(bErrorMessage, "Error", "Info"), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
End If
|
||||
If MachgroupErrorList.Count > 0 Then
|
||||
Dim sMachGroups As String = ""
|
||||
For Each MachGroup In MachgroupErrorList
|
||||
|
||||
Reference in New Issue
Block a user