OmagCUT :
- prime modifiche per dati su Aree Prodotte (Hoffman).
This commit is contained in:
+16
-1
@@ -455,17 +455,20 @@ Public Class CSVPage
|
||||
EgtLuaResetGlobVar("CMP")
|
||||
EgtLuaResetGlobVar("CMP_Draw")
|
||||
' Provo ad inserire i pezzi
|
||||
Dim dNewArea As Double = 0
|
||||
For i As Integer = 1 To InsPartList.Count()
|
||||
Dim CurrPart As CsvPart = InsPartList(i - 1)
|
||||
While CurrPart.m_nToNest > 0
|
||||
If m_bFull Then
|
||||
If NestOnePart(CurrPart.m_nId) Then
|
||||
dNewArea += GeomCalc.GetPartArea(CurrPart.m_nId)
|
||||
CurrPart.m_nToNest -= 1
|
||||
Else
|
||||
Exit While
|
||||
End If
|
||||
Else
|
||||
If ParkOnePart(CurrPart.m_nId) Then
|
||||
dNewArea += GeomCalc.GetPartArea(CurrPart.m_nId)
|
||||
CurrPart.m_nToNest -= 1
|
||||
Else
|
||||
Exit While
|
||||
@@ -473,6 +476,10 @@ Public Class CSVPage
|
||||
End If
|
||||
End While
|
||||
Next
|
||||
' Aggiorno Aree totale e da lavorare dei pezzi
|
||||
m_CurrProjPage.UpdateTotalArea( dNewArea)
|
||||
m_CurrProjPage.UpdateToProduceArea()
|
||||
m_MainWindow.m_CurrentProjectPageUC.ShowAreas()
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -503,10 +510,14 @@ Public Class CSVPage
|
||||
Dim bOther As Boolean = False
|
||||
Dim sOtherCsv As String = String.Empty
|
||||
' Rimuovo i pezzi selezionati della lista CSV corrente e ne aggiorno i contatori
|
||||
Dim dEraseArea As Double = 0
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
Dim nNextId As Integer = EgtGetNextSelectedObj()
|
||||
If Not RemoveOnePart(nId) Then
|
||||
Dim dPartArea = GeomCalc.GetPartArea( nId)
|
||||
If RemoveOnePart(nId) Then
|
||||
dEraseArea += dPartArea
|
||||
Else
|
||||
bOther = True
|
||||
Dim sCsvPath As String = String.Empty
|
||||
If EgtGetInfo(nId, INFO_CSV_PATH, sCsvPath) Then
|
||||
@@ -518,6 +529,10 @@ Public Class CSVPage
|
||||
End If
|
||||
nId = nNextId
|
||||
End While
|
||||
' Aggiorno Aree totale e da lavorare dei pezzi
|
||||
m_CurrProjPage.UpdateTotalArea( - dEraseArea)
|
||||
m_CurrProjPage.UpdateToProduceArea()
|
||||
m_MainWindow.m_CurrentProjectPageUC.ShowAreas()
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
' Aggiorno TreeView
|
||||
|
||||
@@ -152,6 +152,10 @@ Module ConstGen
|
||||
Public Const INFO_REGROT As String = "RegRot"
|
||||
' Info con path carico progetto
|
||||
Public Const INFO_LOADPATH As String = "LoadPath"
|
||||
' Info per area totale dei pezzi del progetto
|
||||
Public Const INFO_TOTAREA As String = "TotArea"
|
||||
' Info per area da produrre dei pezzi del progetto
|
||||
Public Const INFO_TOPRODAREA As String = "ToProdArea"
|
||||
|
||||
' Nome layer delle regioni
|
||||
Public Const NAME_REGION As String = "Region"
|
||||
|
||||
+12
@@ -215,4 +215,16 @@ Module ConstIni
|
||||
Public Const K_DC_SING_POSX As String = "SingPosX"
|
||||
Public Const K_DC_SING_POSY As String = "SingPosY"
|
||||
|
||||
Public Const S_STATDATA As String = "StatData"
|
||||
Public Const K_SD_DAY As String = "Day"
|
||||
Public Const K_SD_WEEKDAY As String = "WeekDay"
|
||||
Public Const K_SD_DAYPARTS As String = "DayParts"
|
||||
Public Const K_SD_DAYCUTS As String = "DayCuts"
|
||||
Public Const K_SD_DAYRESETPARTS As String = "DayResetParts"
|
||||
Public Const K_SD_DAYRESETCUTS As String = "DayResetCuts"
|
||||
Public Const K_SD_WEEKPARTS As String = "WeekParts"
|
||||
Public Const K_SD_WEEKCUTS As String = "WeekCuts"
|
||||
Public Const K_SD_WEEKRESETPARTS As String = "WeekResetParts"
|
||||
Public Const K_SD_WEEKRESETCUTS As String = "WeekResetCuts"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -101,6 +101,10 @@
|
||||
Public Const K_PRODLIPROBINGTCPOS2VAR As String = "ProbingTcPos2Var"
|
||||
Public Const K_PRODLISAWDIAMETER2VAR As String = "SawDiameter2Var"
|
||||
|
||||
Public Const S_STATISTICS As String = "Stats"
|
||||
Public Const K_DATADIR As String = "DataDir"
|
||||
Public Const K_SHOWAREAS As String = "ShowAreas"
|
||||
|
||||
Public Const S_TABLE As String = "Table"
|
||||
Public Const K_ADDITIONALTABLE As String = "AdditionalTable"
|
||||
Public Const K_TAB2_ADDITIONALTABLE As String = "Tab2AdditionalTable"
|
||||
|
||||
@@ -205,9 +205,13 @@ Public Class CurrentProjectPageUC
|
||||
|
||||
Friend Function NewProject(Optional nTabInd As Integer = 1,
|
||||
Optional bRetainParkedParts As Boolean = False) As Boolean
|
||||
' Salvo l'area totale dei pezzi
|
||||
Dim dTotArea As Double = 0
|
||||
' Se richiesto, conservo eventuali pezzi parcheggiati del progetto corrente
|
||||
Dim sTmpFile As String = String.Empty
|
||||
If bRetainParkedParts Then
|
||||
' Salvo l'Area totale dei pezzi
|
||||
dTotArea = GetTotalArea()
|
||||
' Cancello i pezzi lavorati (nella lastra)
|
||||
Dim nMGrpId As Integer = EgtGetFirstRawPart()
|
||||
Dim nPartId As Integer = EgtGetFirstPartInRawPart(nMGrpId)
|
||||
@@ -262,6 +266,10 @@ Public Class CurrentProjectPageUC
|
||||
' Passo al pezzo successivo
|
||||
nId2 = EgtGetNextPart(nId2)
|
||||
End While
|
||||
' Aggiorno Aree totale e da lavorare dei pezzi
|
||||
SetTotalArea( dTotArea)
|
||||
UpdateToProduceArea()
|
||||
ShowAreas()
|
||||
' Dichiaro progetto non modificato
|
||||
EgtResetModified()
|
||||
Return True
|
||||
@@ -1046,6 +1054,89 @@ Public Class CurrentProjectPageUC
|
||||
If bOldEnMod Then EgtEnableModified()
|
||||
End Sub
|
||||
|
||||
' Gestione area pezzi totale e area pezzi da produrre
|
||||
|
||||
Friend Function SetTotalArea( dTotArea As Double) As Boolean
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Return EgtSetInfo(nMarkId, INFO_TOTAREA, dTotArea)
|
||||
End Function
|
||||
|
||||
Friend Function UpdateTotalArea( dNewArea As Double) As Boolean
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Dim dTotArea As Double = 0
|
||||
EgtGetInfo( nMarkId, INFO_TOTAREA, dTotArea)
|
||||
dTotArea = Math.Max( dTotArea + dNewArea, 0)
|
||||
Return EgtSetInfo(nMarkId, INFO_TOTAREA, dTotArea)
|
||||
End Function
|
||||
|
||||
Friend Function GetTotalArea() As Double
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Dim dTotArea As Double = 0
|
||||
EgtGetInfo( nMarkId, INFO_TOTAREA, dTotArea)
|
||||
Return dTotArea
|
||||
End Function
|
||||
|
||||
Friend Function UpdateToProduceArea() As Boolean
|
||||
Dim dToProdArea As Double = 0
|
||||
' Ciclo sui pezzi nella lastra
|
||||
Dim nPartId As Integer = EgtGetFirstPartInRawPart( CamAuto.GetCurrentRaw())
|
||||
While nPartId <> GDB_ID.NULL
|
||||
dToProdArea += GeomCalc.GetPartArea( nPartId)
|
||||
nPartId = EgtGetNextPartInRawPart( nPartId)
|
||||
End While
|
||||
' Ciclo sui pezzi in parcheggio
|
||||
nPartId = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
dToProdArea += GeomCalc.GetPartArea( nPartId)
|
||||
nPartId = EgtGetNextPart( nPartId)
|
||||
End While
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Return EgtSetInfo(nMarkId, INFO_TOPRODAREA, dToProdArea)
|
||||
End Function
|
||||
|
||||
Friend Function GetToProduceArea() As Double
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Dim dToProdArea As Double = 0
|
||||
EgtGetInfo( nMarkId, INFO_TOPRODAREA, dToProdArea)
|
||||
Return dToProdArea
|
||||
End Function
|
||||
|
||||
Friend Sub ShowAreas()
|
||||
' Recupero il gruppo di Mark e lo svuoto
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
EgtEmptyGroup( nMarkId)
|
||||
' Se non sono da visualizzare esco
|
||||
if GetPrivateProfileInt( S_STATISTICS, K_SHOWAREAS, 0, m_MainWindow.GetMachIniFile()) = 0 Then Return
|
||||
' Recupero dati
|
||||
Dim dTotArea As Double = GetTotalArea()
|
||||
Dim dToProdArea As Double = GetToProduceArea()
|
||||
' Recupero box tavola
|
||||
Dim b3Tab As New BBox3d
|
||||
If Not EgtGetTableArea(1, b3Tab) Then
|
||||
b3Tab.Add(New Point3d(0, 0, 0))
|
||||
b3Tab.Add(New Point3d(-3600, -2600, 0))
|
||||
End If
|
||||
' Scritte
|
||||
Const TEXT_DIST As Double = 100
|
||||
Dim ptIns As New Point3d( b3Tab.Center().x, b3Tab.Max().y + TEXT_DIST, b3Tab.Max().z)
|
||||
Dim dCoeff As Double = 1.0 / 1000000.0
|
||||
Dim sUnit As String = " m²"
|
||||
If Not EgtUiUnitsAreMM() Then
|
||||
dCoeff = 1.0 / ( 12 * ONEINCH * 12 * ONEINCH)
|
||||
sUnit = " ft²"
|
||||
End If
|
||||
Dim sText As String = EgtMsg( 90328) & " " & DoubleToString( dTotArea * dCoeff, 3) & sUnit & " " &
|
||||
EgtMsg( 90329) & " " & DoubleToString( dToProdArea * dCoeff, 3) & sUnit
|
||||
Dim nText As Integer = EgtCreateTextAdv( nMarkId, ptIns, 0, sText, "", 500, False, 100, 1, 0, INS_POS.MC)
|
||||
EgtSetColor( nText, New Color3d( 0, 0, 0))
|
||||
End Sub
|
||||
|
||||
Friend Sub SetAreasStatus( bShow As Boolean)
|
||||
Dim nMarkId = EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK)
|
||||
If nMarkId = GDB_ID.NULL Then Return
|
||||
EgtSetStatus( nMarkId, If( bShow, GDB_ST.ON_, GDB_ST.OFF))
|
||||
End Sub
|
||||
|
||||
' Gestione messaggi in interfaccia
|
||||
|
||||
Friend Sub SetInfoMessage(sMessage As String)
|
||||
|
||||
@@ -699,6 +699,9 @@ Public Class DrawPageUC
|
||||
Dim bDirect As Boolean = (GetPrivateProfileInt(S_NEST, K_DIRECT, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
' Elimino eventuali precedenti pezzi vuoti
|
||||
EgtEraseEmptyParts()
|
||||
' Area dei nuovi pezzi
|
||||
Dim dNewArea As Double = 0
|
||||
' Se esiste il file del pezzo
|
||||
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
||||
' eseguo inserimento
|
||||
For i As Integer = 1 To nNbr
|
||||
@@ -710,6 +713,8 @@ Public Class DrawPageUC
|
||||
EgtAdjustFlatPart(nId2)
|
||||
' Se dati Trf assegno nome univoco
|
||||
If m_bTrfData Then EgtSetInfo(nId2, "CsvPart", m_TrfOrderCode & "-" & nId2.ToString())
|
||||
' Aggiorno l'area dei nuovi pezzi
|
||||
dNewArea += GeomCalc.GetPartArea( nId2)
|
||||
' Inserisco in parcheggio
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId2, True)
|
||||
' Se richiesto posizionamento diretto, lo eseguo
|
||||
@@ -723,6 +728,10 @@ Public Class DrawPageUC
|
||||
' Cancello il file
|
||||
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||
End If
|
||||
' Aggiorno Aree totale e da lavorare dei pezzi
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateTotalArea( dNewArea)
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateToProduceArea()
|
||||
m_MainWindow.m_CurrentProjectPageUC.ShowAreas()
|
||||
' Aggiorno ambiente principale
|
||||
EgtZoom(ZM.ALL)
|
||||
Return True
|
||||
|
||||
@@ -549,7 +549,7 @@ Public Class FlatteningCut
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.ExecSentProgScript()
|
||||
m_MainWindow.ExecSentProgScript()
|
||||
End If
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
+11
@@ -54,4 +54,15 @@ Module GeomCalc
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function GetPartArea( nPartid As Integer) As Double
|
||||
Dim nRegId As Integer = EgtGetFirstNameInGroup( nPartId, NAME_REGION)
|
||||
Dim nSurfId As Integer = EgtGetFirstInGroup( nRegId)
|
||||
While nSurfId <> GDB_ID.NULL and EgtGetType( nSurfId) <> GDB_TY.SRF_FRGN
|
||||
nSurfId = EgtGetNext( nSurfId)
|
||||
End While
|
||||
Dim dArea As Double = 0
|
||||
EgtSurfFrGrossArea( nSurfId, dArea)
|
||||
Return dArea
|
||||
End Function
|
||||
|
||||
End Module
|
||||
|
||||
+1
-1
@@ -475,7 +475,7 @@ Public Class GridCut
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.ExecSentProgScript()
|
||||
m_MainWindow.ExecSentProgScript()
|
||||
End If
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
+13
-1
@@ -691,8 +691,16 @@ Public Class ImportPageUC
|
||||
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
||||
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||
End If
|
||||
' Nascondo tutti i pezzi inseriti (per evitare interferenze con pezzi in fase di parcheggio)
|
||||
' Calcolo l'area dei pezzi inseriti
|
||||
Dim dNewArea As Double = 0
|
||||
Dim nId As Integer = nFirstId
|
||||
While nId <> GDB_ID.NULL
|
||||
dNewArea += GeomCalc.GetPartArea( nId)
|
||||
' Passo al pezzo successivo
|
||||
nId = EgtGetNextPart(nId)
|
||||
End While
|
||||
' Nascondo tutti i pezzi inseriti (per evitare interferenze con pezzi in fase di parcheggio)
|
||||
nId = nFirstId
|
||||
While nId <> GDB_ID.NULL
|
||||
EgtSetStatus(nId, GDB_ST.OFF)
|
||||
' Passo al pezzo successivo
|
||||
@@ -724,6 +732,10 @@ Public Class ImportPageUC
|
||||
End While
|
||||
' Eventuale aggiornamento VeinMatching
|
||||
VeinMatching.ZoomAll()
|
||||
' Aggiorno Aree totale e da lavorare dei pezzi
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateTotalArea( dNewArea)
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateToProduceArea()
|
||||
m_MainWindow.m_CurrentProjectPageUC.ShowAreas()
|
||||
' Aggiorno ambiente principale
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
+27
-1
@@ -1574,6 +1574,29 @@ Class MainWindow
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function ExecSentProgScript() As Boolean
|
||||
' Verifico esistenza script
|
||||
Dim sLuaPath As String = m_CurrentMachine.sMachDir() & "\Scripts\SentProg.lua"
|
||||
If Not My.Computer.FileSystem.FileExists(sLuaPath) Then Return True
|
||||
' Definizione variabili
|
||||
EgtLuaCreateGlobTable("SPS")
|
||||
EgtLuaSetGlobBoolVar("SPS.NCLINK", m_bNCLink)
|
||||
EgtLuaSetGlobBoolVar("SPS.PRODLINE", m_CurrentMachine.bProdLine)
|
||||
' Esecuzione
|
||||
Dim nErr As Integer = 999
|
||||
If EgtLuaExecFile(sLuaPath) AndAlso
|
||||
EgtLuaCallFunction("SPS.Exec") Then
|
||||
' Verifica stato di errore
|
||||
EgtLuaGetGlobIntVar("SPS.ERR", nErr)
|
||||
End If
|
||||
EgtLuaResetGlobVar("SPS")
|
||||
If nErr <> 0 Then
|
||||
EgtOutLog("Error in SentProg : " & nErr.ToString())
|
||||
m_CurrentProjectPageUC.SetErrorMessage(EgtMsg(90325)) 'Errore nel salvataggio delle statistiche
|
||||
End If
|
||||
Return (nErr = 0)
|
||||
End Function
|
||||
|
||||
Private Function ExecReceivedViewScript(nLastCopy As Integer, sDateTime As String, sRuPartsDir As String) As Boolean
|
||||
' Verifico esistenza script
|
||||
Dim sLuaPath As String = m_CurrentMachine.sMachDir() & "\Scripts\ReceivedView.lua"
|
||||
@@ -1602,7 +1625,7 @@ Class MainWindow
|
||||
m_CurrentProjectPageUC.SetErrorMessage(EgtMsg(90325)) 'Errore nel salvataggio delle statistiche
|
||||
ElseIf nRuPartsCnt > 0 Then
|
||||
EgtOutLog("New Ruined Parts : " & nRuPartsCnt.ToString())
|
||||
m_CurrentProjectPageUC.SetInfoMessage(EgtMsg(90327)) 'Inseriti Nuovi Pezzi Rovinati
|
||||
m_CurrentProjectPageUC.SetInfoMessage(EgtMsg(90327)) 'Inseriti Nuovi Pezzi Rovinati
|
||||
Dim nCurrCtx As Integer = EgtGetCurrentContext()
|
||||
EgtSetCurrentContext(m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
Dim nPartId As Integer = EgtGetLastPart()
|
||||
@@ -1613,6 +1636,9 @@ Class MainWindow
|
||||
EgtZoom(ZM.ALL)
|
||||
EgtSetCurrentContext(nCurrCtx)
|
||||
End If
|
||||
' Aggiorno Area da lavorare dei pezzi
|
||||
m_CurrentProjectPageUC.UpdateToProduceArea()
|
||||
m_CurrentProjectPageUC.ShowAreas()
|
||||
Return (nErr = 0)
|
||||
End Function
|
||||
|
||||
|
||||
+1
-1
@@ -502,7 +502,7 @@ Public Class MultipleCut
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.ExecSentProgScript()
|
||||
m_MainWindow.ExecSentProgScript()
|
||||
End If
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
@@ -1032,12 +1032,15 @@ Public Class NestPageUC
|
||||
End Select
|
||||
End If
|
||||
' Ciclo di cancellazione dei pezzi selezionati
|
||||
Dim dEraseArea As Double = 0
|
||||
nId = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
' Recupero indice del successivo
|
||||
Dim nNextId = EgtGetNextSelectedObj()
|
||||
' Se abilitata cancellazione in ogni caso o pezzo non da Csv
|
||||
If bEraseCsvParts OrElse Not EgtExistsInfo(nId, INFO_CSV_PATH) Then
|
||||
' Aggiorno l'area dei pezzi cancellati
|
||||
dEraseArea += GeomCalc.GetPartArea( nId)
|
||||
' Se pezzo in parcheggio cancello direttamente
|
||||
If EgtIsPart(nId) Then
|
||||
' Rimuovo le lavorazioni
|
||||
@@ -1061,6 +1064,10 @@ Public Class NestPageUC
|
||||
End While
|
||||
' Imposto flag posizione pezzi
|
||||
m_nPartPos = PART_POS.NONE_TABLE
|
||||
' Aggiorno Aree totale e da lavorare dei pezzi
|
||||
m_CurrProjPage.UpdateTotalArea( - dEraseArea)
|
||||
m_CurrProjPage.UpdateToProduceArea()
|
||||
m_CurrProjPage.ShowAreas()
|
||||
' Aggiorno vista
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
+4
-27
@@ -346,7 +346,7 @@ Public Class ProjectMgrUC
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' lancio eventuale lua post-trasmissione
|
||||
ExecSentProgScript()
|
||||
m_MainWindow.ExecSentProgScript()
|
||||
End If
|
||||
' Altrimenti linea di produzione
|
||||
Else
|
||||
@@ -361,7 +361,7 @@ Public Class ProjectMgrUC
|
||||
' Salvo il progetto
|
||||
m_CurrProjPage.SaveProject()
|
||||
' lancio eventuale lua post-trasmissione
|
||||
ExecSentProgScript()
|
||||
m_MainWindow.ExecSentProgScript()
|
||||
Return
|
||||
End If
|
||||
' Verifico non sia già stato trasmesso
|
||||
@@ -420,7 +420,7 @@ Public Class ProjectMgrUC
|
||||
' Dichiaro programma inviato
|
||||
m_CurrNcComm.m_CN.DVariables_WriteVariables2(m_CurrMachine.sVarProg1, "1")
|
||||
' lancio eventuale lua post-trasmissione
|
||||
ExecSentProgScript()
|
||||
m_MainWindow.ExecSentProgScript()
|
||||
End If
|
||||
m_CurrNcComm.SetProgramMainOrSub(True)
|
||||
' Altrimenti verifico se posso scrivere nell'area 2
|
||||
@@ -437,7 +437,7 @@ Public Class ProjectMgrUC
|
||||
' Dichiaro programma inviato
|
||||
m_CurrNcComm.m_CN.DVariables_WriteVariables2(m_CurrMachine.sVarProg2, "1")
|
||||
' lancio eventuale lua post-trasmissione
|
||||
ExecSentProgScript()
|
||||
m_MainWindow.ExecSentProgScript()
|
||||
End If
|
||||
m_CurrNcComm.SetProgramMainOrSub(True)
|
||||
' Altrimenti aree di memoria non disponibili
|
||||
@@ -624,27 +624,4 @@ Public Class ProjectMgrUC
|
||||
m_CurrProjPage.ClearMessage()
|
||||
End Sub
|
||||
|
||||
Friend Function ExecSentProgScript() As Boolean
|
||||
' Verifico esistenza script
|
||||
Dim sLuaPath As String = m_MainWindow.m_CurrentMachine.sMachDir() & "\Scripts\SentProg.lua"
|
||||
If Not My.Computer.FileSystem.FileExists(sLuaPath) Then Return True
|
||||
' Definizione variabili
|
||||
EgtLuaCreateGlobTable("SPS")
|
||||
EgtLuaSetGlobBoolVar("SPS.NCLINK", m_MainWindow.m_bNCLink)
|
||||
EgtLuaSetGlobBoolVar("SPS.PRODLINE", m_CurrMachine.bProdLine)
|
||||
' Esecuzione
|
||||
Dim nErr As Integer = 999
|
||||
If EgtLuaExecFile(sLuaPath) AndAlso
|
||||
EgtLuaCallFunction("SPS.Exec") Then
|
||||
' Verifica stato di errore
|
||||
EgtLuaGetGlobIntVar("SPS.ERR", nErr)
|
||||
End If
|
||||
EgtLuaResetGlobVar("SPS")
|
||||
If nErr <> 0 Then
|
||||
EgtOutLog("Error in SentProg : " & nErr.ToString())
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90325)) 'Errore nel salvataggio delle statistiche
|
||||
End If
|
||||
Return (nErr = 0)
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
+1
-1
@@ -424,7 +424,7 @@ Public Class SawTestUC
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.ExecSentProgScript()
|
||||
m_MainWindow.ExecSentProgScript()
|
||||
End If
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
@@ -41,6 +41,8 @@ Public Class SimulationPageUC
|
||||
EgtSetCurrPhase(1, True)
|
||||
' Ripristino visibilità standard
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
' Visualizzo eventuali testi con dati su aree
|
||||
m_CurrProjPage.SetAreasStatus( True)
|
||||
End Sub
|
||||
|
||||
Private Sub SimulationPage_Initialized(sender As Object, e As EventArgs)
|
||||
@@ -156,6 +158,8 @@ Public Class SimulationPageUC
|
||||
m_CurrProjPage.SaveFile(sMchPath, False)
|
||||
' Nascondo eventuale contorno da foto
|
||||
m_CurrProjPage.ShowContour(False)
|
||||
' Nascondo eventuali testi con dati su aree
|
||||
m_CurrProjPage.SetAreasStatus( false)
|
||||
' Imposto prima fase
|
||||
EgtSetCurrPhase(1)
|
||||
ShowAllCurrPhaseMachinings()
|
||||
|
||||
+1
-1
@@ -518,7 +518,7 @@ Public Class SingleCutUC
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.ExecSentProgScript()
|
||||
m_MainWindow.ExecSentProgScript()
|
||||
End If
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user