Compare commits

..

1 Commits

Author SHA1 Message Date
NicolaP 0477c42208 Salvo dimensione sovratavola per ogni macchinata 2022-06-09 12:37:44 +02:00
2 changed files with 30 additions and 26 deletions
+30 -2
View File
@@ -223,6 +223,8 @@ Public Class MySceneHostVM
End Sub
Private Function ExecExport(sDirDest As String) As Boolean
' salvo il nome della macchina correntemente selezionata
Dim CurrentSelectedMachGroup As String = OmagOFFICEMap.refMachGroupPanelVM.SelectedMachGroup.Machine
' Path completa del progetto corrente
Dim sFilePath As String = String.Empty
EgtGetCurrFilePath(sFilePath)
@@ -282,10 +284,10 @@ Public Class MySceneHostVM
File.Copy(sOriPath, sNewPath, True)
Catch ex As Exception
bOk = False
EgtOutLog( "Slab image not found :" & sOriPath)
EgtOutLog("Slab image not found :" & sOriPath)
End Try
EgtSetName(nPhotoId, PHOTO_NAME)
EgtChangePhotoCenterAsFlatScan( nPhotoId)
EgtChangePhotoCenterAsFlatScan(nPhotoId)
End If
' Elimino gli altri gruppi di lavorazioni
For Each nMGrpId As Integer In vMchGrps
@@ -308,6 +310,25 @@ Public Class MySceneHostVM
Dim nMarkId As Integer = EgtCreateGroup(GDB_ID.ROOT)
EgtSetName(nMarkId, NAME_PROJMARK)
EgtSetLevel(nMarkId, GDB_LV.SYSTEM)
' Imposto la macchina: salvo l'altezza della sovratavola
Dim sMachine As String = String.Empty
EgtGetInfo(nMchGrpId, "Machine", sMachine)
If Not String.IsNullOrEmpty(sMachine) Then
InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, sMachine,
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PRODUCTION_LINE),
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_MILL),
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_POLISHING),
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_WJ),
True)
Select Case GetCurrentTable()
Case 3
EgtSetInfo(nMarkId, K_TAB3_ADDITIONALTABLE, CurrentMachine.dAdditionalTable)
Case 2
EgtSetInfo(nMarkId, K_TAB2_ADDITIONALTABLE, CurrentMachine.dAdditionalTable)
Case Else
EgtSetInfo(nMarkId, K_ADDITIONALTABLE, CurrentMachine.dAdditionalTable)
End Select
End If
Dim nReducedCut As Integer = 1
EgtGetInfo(nMchGrpId, INFO_REDUCEDCUT, nReducedCut)
EgtSetInfo(nMarkId, INFO_REDUCEDCUT, nReducedCut)
@@ -326,6 +347,13 @@ Public Class MySceneHostVM
' Salvo il file
If Not EgtSaveFile(sFileDest, NGE.CMPTEXT) Then bOk = False
Next
' reimposto la macchina corrente
InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, CurrentSelectedMachGroup,
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PRODUCTION_LINE),
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_MILL),
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_POLISHING),
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_WJ),
True)
' Distruggo il contesto corrente e ripristino quello originale
EgtSetCurrentContext(nCurrCtx)
EgtDeleteContext(nCtx)
-24
View File
@@ -595,32 +595,8 @@ Public Class SplitModeVM
' assegno numerazione
NumberDirectionMachining(nI)
Next
' -------------------- Recupero le lavorazioni indicate come attive --------------------
Dim ActiveMachLst As New List(Of Integer)
For Each ItemSplitMach As NameIdLsBxItem In m_ItemList
ActiveMachLst.Add(ItemSplitMach.Ind)
Next
' -------------------- Recupero le lavorazioni indicate come attive --------------------
' Preparo la lista degli Item
ShowMachiningList()
' -------------------- Riattivo le lavorazioni precedenti --------------------
For Each Item As SplitMach In m_MachiningList
EgtSetInfo(Item.m_nId, INFO_MCH_USER_OFF, True)
Next
For nIndex As Integer = 0 To ActiveMachLst.Count - 1
For Each ItemSplitMach As NameIdLsBxItem In m_ItemList
If ItemSplitMach.Ind = ActiveMachLst(nIndex) Then
EgtRemoveInfo(m_MachiningList(ItemSplitMach.Ind).m_nId, INFO_MCH_USER_OFF)
m_MachiningList(ItemSplitMach.Ind).m_bEnabled = True
ItemSplitMach.bIsActive = True
' sistemo colore
ColorMachining(m_MachiningList(ItemSplitMach.Ind))
Exit For
End If
Next
Next
' -------------------- Riattivo le lavorazioni precedenti --------------------
' Aggiorno visualizzazione
EgtDraw()
' Aggiono abilitazione bottoni