Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d9a157b35 | |||
| 405fde996c | |||
| 8321f09af8 | |||
| 391583b9ea | |||
| 5cf0472806 | |||
| 89598c154e | |||
| b25d73c0cb |
@@ -175,8 +175,10 @@
|
||||
Public Const BTL_PRT_REFSIDE = "REFERENCESIDE"
|
||||
Public Const BTL_PRT_ALIGNMENT = "ALIGNMENT"
|
||||
Public Const BTL_PRT_MATERIALTYPE = "MATERIALTYPE"
|
||||
Public Const BTL_PRT_DESCRIPTION = "NAM"
|
||||
|
||||
' parametri generici
|
||||
Public Const BTL_GEN_BTLPATH = "BTL"
|
||||
Public Const BTL_GEN_PROJNUM = "PROJECTNUMBER"
|
||||
Public Const BTL_GEN_PROJNAME = "PROJECTNAME"
|
||||
Public Const BTL_GEN_PROJPART = "PROJECTPART"
|
||||
@@ -299,6 +301,8 @@
|
||||
Public Const BTLFILENAME As String = "BTLFILENAME"
|
||||
Public Const EXP_PART As String = "ImportExport"
|
||||
Public Const EXP_MACHINE As String = "Machine"
|
||||
' parametro che indica se il progetto e' stato appena importato e quindi bisogna riverificare i MachGroup
|
||||
Public Const IMP_VERIFYMACHGROUP As String = "VerifyMachGroup"
|
||||
|
||||
' parametri modifica percorsi free contour
|
||||
Public Const PATH_SIDEANGLAYER As String = "SideAngLayer"
|
||||
|
||||
@@ -102,6 +102,7 @@ Public Module ConstIni
|
||||
Public Const K_SUPERVISORMACH As String = "SupervisorMach"
|
||||
Public Const K_PASSWORD As String = "Password"
|
||||
Public Const K_CHANGEMACH As String = "ChangeMach"
|
||||
Public Const K_EXPORTBWE As String = "ExpBwe"
|
||||
|
||||
'Public Const S_SIMUL As String = "Simul"
|
||||
'Public Const K_SLIDERX As String = "SliderX"
|
||||
|
||||
@@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.5.2.3")>
|
||||
<Assembly: AssemblyFileVersion("2.5.2.3")>
|
||||
<Assembly: AssemblyVersion("2.5.3.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.3.2")>
|
||||
|
||||
@@ -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.5.2.3")]
|
||||
[assembly: AssemblyFileVersion("2.5.2.3")]
|
||||
[assembly: AssemblyVersion("2.5.3.2")]
|
||||
[assembly: AssemblyFileVersion("2.5.3.2")]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtBEAMWALL.Core
|
||||
@@ -1003,14 +1004,48 @@ Public Class LeftPanelVM
|
||||
|
||||
Private Sub CreateDataFile(sFilePath As String, SelPart As PartVM, SelMachGroup As MyMachGroupVM)
|
||||
Dim sFileText As New List(Of String)
|
||||
Dim nBtlInfoId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
Dim sInfo As String = ""
|
||||
Dim bOk As Boolean = False
|
||||
' inserisco il capitolo del [Main]
|
||||
sFileText.Add("[Main]")
|
||||
sFileText.Add("Var1=$PRODID$," & Map.refSupervisorManagerVM.CurrProd.sProdId)
|
||||
sFileText.Add("Var2=$MACHGROUPID$," & SelMachGroup.Id)
|
||||
sFileText.Add("Var2=$MACHGROUPID$," & SelMachGroup.nName)
|
||||
sFileText.Add("Var3=$PARTID$," & SelPart.nPDN)
|
||||
sFileText.Add("Var4=$MATERIAL$," & SelPart.sMATERIAL)
|
||||
'sFileText.Add("Var5=$Thickness$," & SelPart.Thickness)
|
||||
'sFileText.Add("Var6=$Storage$," & SelPart.WarehousePosition)
|
||||
bOk = EgtGetInfo(nBtlInfoId, BTL_GEN_PROJNUM, sInfo)
|
||||
sFileText.Add("Var5=$PROJECTNUMBER$," & If(bOk, sInfo, ""))
|
||||
bOk = EgtGetInfo(nBtlInfoId, BTL_GEN_PROJNAME, sInfo)
|
||||
sFileText.Add("Var6=$PROJECTNAME$," & If(bOk, sInfo, ""))
|
||||
bOk = EgtGetInfo(nBtlInfoId, BTL_GEN_CUSTOMER, sInfo)
|
||||
sFileText.Add("Var7=$CUSTOMER$," & If(bOk, sInfo, ""))
|
||||
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_ASSEMBLYNUM, sInfo)
|
||||
sFileText.Add("Var8=$ASSEMBLYNUMBER$," & If(bOk, sInfo, ""))
|
||||
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_ORDERNUM, sInfo)
|
||||
sFileText.Add("Var9=$ORDERNUMBER$," & If(bOk, sInfo, ""))
|
||||
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_DESIGNATION, sInfo)
|
||||
sFileText.Add("Var10=$DESIGNATION$," & If(bOk, sInfo, ""))
|
||||
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_ANNOTATION, sInfo)
|
||||
sFileText.Add("Var11=$ANNOTATION$," & If(bOk, sInfo, ""))
|
||||
sFileText.Add("Var12=$STOREY$," & SelPart.sSTOREY)
|
||||
sFileText.Add("Var13=$GROUP$," & SelPart.sGROUP)
|
||||
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_PACKAGE, sInfo)
|
||||
sFileText.Add("Var14=$PACKAGE$," & If(bOk, sInfo, ""))
|
||||
sFileText.Add("Var15=$WHL$," & SelPart.sW & "x" & SelPart.sH & "x" & SelPart.sL)
|
||||
sFileText.Add("Var16=$PRODUCTIONDATE$," & Date.Now().ToString("yyyy-MM-dd"))
|
||||
' calcolo numero settimana corrente secondo ISO 8601
|
||||
Dim time As Date = Date.Now()
|
||||
Dim Day As DayOfWeek = CultureInfo.InvariantCulture.Calendar.GetDayOfWeek(time)
|
||||
If Day >= DayOfWeek.Monday AndAlso Day <= DayOfWeek.Wednesday Then time = time.AddDays(3)
|
||||
Dim nWeekOfYear As Integer = CultureInfo.InvariantCulture.Calendar.GetWeekOfYear(time, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday)
|
||||
sFileText.Add("Var17=$PRODUCTIONWEEK$," & nWeekOfYear)
|
||||
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_DESCRIPTION, sInfo)
|
||||
sFileText.Add("Var18=$DESCRIPTION$," & If(bOk, sInfo, ""))
|
||||
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_QUALITYGRADE, sInfo)
|
||||
sFileText.Add("Var19=$QUALITYGRADE$," & If(bOk, sInfo, ""))
|
||||
bOk = EgtGetInfo(nBtlInfoId, BTL_GEN_BTLPATH, sInfo)
|
||||
sFileText.Add("Var20=$BTLPATH$," & If(bOk, Path.GetFileNameWithoutExtension(sInfo), ""))
|
||||
|
||||
Try
|
||||
File.WriteAllLines(sFilePath, sFileText)
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -666,10 +666,17 @@ Public Class MachCommandMessagePanelVM
|
||||
ErrorAdditionalMsg = "Line Number"
|
||||
ErrorNumberMsg = "CN:"
|
||||
End If
|
||||
Dim sErrorMessage As String = ErrorMessage
|
||||
If bMsgTranslationActive Then
|
||||
Dim sTranslatedMsg = MachMsg(MsgParagraphs.CNC, nErrorNumber)
|
||||
If Not String.IsNullOrWhiteSpace(sTranslatedMsg) Then
|
||||
sErrorMessage = sTranslatedMsg
|
||||
End If
|
||||
End If
|
||||
ErrorLineMsg = "Number from the Cnc Block"
|
||||
AlarmMessage = If(nErrorNumber <> 0, ErrorNumberMsg & ": " & nErrorNumber & " - ", "") &
|
||||
If(nErrorExtNumber <> 0, " - " & ErrorExtNumberMsg & ": " & nErrorExtNumber, "") &
|
||||
" " & ErrorMessage
|
||||
" " & sErrorMessage
|
||||
Case NUM_ErrorTypes.Drive_Error
|
||||
ErrorIndexMsg = "Azionamento: Asse"
|
||||
ErrorNumberMsg = "Ext"
|
||||
|
||||
@@ -240,8 +240,8 @@ Public Class MainWindowM
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2501, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2501, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2503, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2503, 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.5.2.3")>
|
||||
<Assembly: AssemblyFileVersion("2.5.2.3")>
|
||||
<Assembly: AssemblyVersion("2.5.3.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.3.2")>
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
<RowDefinition Height="6*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TabControl Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2">
|
||||
<TabControl Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2"
|
||||
SelectedIndex="{Binding SelConfigSubPage}">
|
||||
<TabItem Header="General">
|
||||
<TabItem.Content>
|
||||
<Grid>
|
||||
|
||||
@@ -7,6 +7,32 @@ Imports EgtBEAMWALL.Core
|
||||
Public Class ConfigurationPageVM
|
||||
Inherits VMBase
|
||||
|
||||
Public Enum ConfigSubPages As Integer
|
||||
GENERAL = 0
|
||||
QPARAMETERS = 1
|
||||
MACHINE = 2
|
||||
End Enum
|
||||
|
||||
Private m_QParametersModified As Boolean = False
|
||||
Friend ReadOnly Property QParametersModified As Boolean
|
||||
Get
|
||||
Return m_QParametersModified
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub ResetQParametersModified()
|
||||
m_QParametersModified = False
|
||||
End Sub
|
||||
|
||||
Private m_SelConfigSubPage As ConfigSubPages = ConfigSubPages.GENERAL
|
||||
Public Property SelConfigSubPage As Integer
|
||||
Get
|
||||
Return m_SelConfigSubPage
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_SelConfigSubPage = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' flag modifica parametri Macchina
|
||||
Friend bModifyMachParam As Boolean
|
||||
|
||||
@@ -325,13 +351,19 @@ Public Class ConfigurationPageVM
|
||||
''' Execute the Save. This method is invoked by the SaveCommand.
|
||||
''' </summary>
|
||||
Public Sub Save()
|
||||
WriteMachParams()
|
||||
WriteMachParamsLua()
|
||||
WriteProcessParams(PRCList.ToList())
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_MESSAGES, m_SelectedLanguage.Name)
|
||||
WriteMainPrivateProfileString(S_SCENE, K_MMUNITS, SelMeasureUnit.ToString())
|
||||
WriteMainPrivateProfileString(S_NEST, K_SECTIONTIME, DoubleToString(m_SectionTime, 5))
|
||||
WriteMainPrivateProfileString(S_NEST, K_PARTTIME, DoubleToString(m_PartTime, 5))
|
||||
VerifyConfigPageModification()
|
||||
'Select Case SelConfigSubPage
|
||||
' Case ConfigSubPages.GENERAL
|
||||
' WriteMachParams()
|
||||
' WriteMachParamsLua()
|
||||
' Case ConfigSubPages.QPARAMETERS
|
||||
' WriteProcessParams(PRCList.ToList())
|
||||
' Case ConfigSubPages.MACHINE
|
||||
' WriteMainPrivateProfileString(S_GENERAL, K_MESSAGES, m_SelectedLanguage.Name)
|
||||
' WriteMainPrivateProfileString(S_SCENE, K_MMUNITS, SelMeasureUnit.ToString())
|
||||
' WriteMainPrivateProfileString(S_NEST, K_SECTIONTIME, DoubleToString(m_SectionTime, 5))
|
||||
' WriteMainPrivateProfileString(S_NEST, K_PARTTIME, DoubleToString(m_PartTime, 5))
|
||||
'End Select
|
||||
End Sub
|
||||
|
||||
#End Region ' SaveCommand
|
||||
@@ -415,58 +447,68 @@ Public Class ConfigurationPageVM
|
||||
|
||||
' funzione che verifica la modifica dei valori in Configurazione e ne chiede il salvataggio
|
||||
Friend Sub VerifyConfigPageModification()
|
||||
' Prima ciclo sui parametri Macchina
|
||||
Dim bExitFor = False
|
||||
For Each MachTableItem In ConfigMachTableList
|
||||
For Each MachParamItem In MachTableItem.MachParamList
|
||||
If MachParamItem.IsModified Then
|
||||
If MessageBox.Show(EgtMsg(61860), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
' scrivo i parametri Macchina
|
||||
WriteMachParams()
|
||||
WriteMachParamsLua()
|
||||
Else
|
||||
' se da non salvare li resetto ed esco dai For
|
||||
CreateMachParams()
|
||||
bExitFor = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If bExitFor Then Exit For
|
||||
Next
|
||||
' Ora ciclo sui parametri Q
|
||||
Dim bAskToSaveDefaultValues As Boolean = False
|
||||
bExitFor = False
|
||||
For Each PRCItem In PRCList
|
||||
For Each QParam In PRCItem.QBTLParamVMList
|
||||
If QParam.bIsModified Then
|
||||
bAskToSaveDefaultValues = True
|
||||
' esco dai For
|
||||
bExitFor = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If bExitFor Then Exit For
|
||||
Next
|
||||
' se nel ciclo è stato trovato almeno un valore modificato chiedo il salvataggio
|
||||
If bAskToSaveDefaultValues Then
|
||||
If MessageBox.Show(EgtMsg(61861), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
' se si è scelto di salvare i valori li scrivo
|
||||
WriteProcessParams(PRCList.ToList())
|
||||
End If
|
||||
' in ogni caso ricarico i valori (in modo da resettare i flag di modifica)
|
||||
GetQParamsList()
|
||||
' carico la lista di tutti i parametri Q ciclando su ogni Process di PRCList
|
||||
If Not IsNothing(QBTLParamVMList) Then
|
||||
QBTLParamVMList.Clear()
|
||||
End If
|
||||
For Each PRCItem In PRCList
|
||||
For Each QBTLParam In PRCItem.QBTLParamVMList
|
||||
QBTLParamVMList.Add(QBTLParam)
|
||||
Select Case m_SelConfigSubPage
|
||||
Case ConfigSubPages.GENERAL
|
||||
' aggiorno tutti i valori senza verificare modifiche
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_MESSAGES, m_SelectedLanguage.Name)
|
||||
WriteMainPrivateProfileString(S_SCENE, K_MMUNITS, SelMeasureUnit.ToString())
|
||||
WriteMainPrivateProfileString(S_NEST, K_SECTIONTIME, DoubleToString(m_SectionTime, 5))
|
||||
WriteMainPrivateProfileString(S_NEST, K_PARTTIME, DoubleToString(m_PartTime, 5))
|
||||
Case ConfigSubPages.QPARAMETERS
|
||||
' ciclo sui parametri Q
|
||||
Dim bAskToSaveDefaultValues As Boolean = False
|
||||
For Each PRCItem In PRCList
|
||||
For Each QParam In PRCItem.QBTLParamVMList
|
||||
If QParam.bIsModified Then
|
||||
bAskToSaveDefaultValues = True
|
||||
' esco dai For
|
||||
bExitFor = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If bExitFor Then Exit For
|
||||
Next
|
||||
Next
|
||||
NotifyPropertyChanged(NameOf(QBTLParamVMList))
|
||||
End If
|
||||
' se nel ciclo è stato trovato almeno un valore modificato chiedo il salvataggio
|
||||
If bAskToSaveDefaultValues Then
|
||||
If MessageBox.Show(EgtMsg(61861), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
' se si è scelto di salvare i valori li scrivo
|
||||
WriteProcessParams(PRCList.ToList())
|
||||
m_QParametersModified = True
|
||||
End If
|
||||
' in ogni caso ricarico i valori (in modo da resettare i flag di modifica)
|
||||
GetQParamsList()
|
||||
' carico la lista di tutti i parametri Q ciclando su ogni Process di PRCList
|
||||
If Not IsNothing(QBTLParamVMList) Then
|
||||
QBTLParamVMList.Clear()
|
||||
End If
|
||||
For Each PRCItem In PRCList
|
||||
For Each QBTLParam In PRCItem.QBTLParamVMList
|
||||
QBTLParamVMList.Add(QBTLParam)
|
||||
Next
|
||||
Next
|
||||
NotifyPropertyChanged(NameOf(QBTLParamVMList))
|
||||
End If
|
||||
Case ConfigSubPages.MACHINE
|
||||
' ciclo sui parametri Macchina
|
||||
For Each MachTableItem In ConfigMachTableList
|
||||
For Each MachParamItem In MachTableItem.MachParamList
|
||||
If MachParamItem.IsModified Then
|
||||
If MessageBox.Show(EgtMsg(61860), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
' scrivo i parametri Macchina
|
||||
WriteMachParams()
|
||||
WriteMachParamsLua()
|
||||
Else
|
||||
' se da non salvare li resetto ed esco dai For
|
||||
CreateMachParams()
|
||||
bExitFor = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If bExitFor Then Exit For
|
||||
Next
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
' funzione che verifica l'inserimento della password quando si edita un parametro Macchina
|
||||
|
||||
@@ -271,12 +271,12 @@ Public Class FreeContourManagerVM
|
||||
Private m_cmdDelete As ICommand
|
||||
Private m_cmdModifyCurve As ICommand
|
||||
Private m_cmdAddPointCurve As ICommand
|
||||
Private m_cmdRemovePointCurve As ICommand
|
||||
Private m_cmdArcflip As ICommand
|
||||
Private m_cmdMove As ICommand
|
||||
Private m_cmdRotate As ICommand
|
||||
Private m_cmdMirror As ICommand
|
||||
Private m_cmdScale As ICommand
|
||||
Private m_cmdRemovePointCurve As ICommand
|
||||
Private m_cmdChangeStart As ICommand
|
||||
Private m_cmdInvertCurve As ICommand
|
||||
Private m_cmdTextAngle As ICommand
|
||||
@@ -987,13 +987,21 @@ Public Class FreeContourManagerVM
|
||||
''' Execute the Line2P. This method is invoked by the Line2PCommand.
|
||||
''' </summary>
|
||||
Public Sub Line2P(ByVal param As Object)
|
||||
Dim nNewPathLayerId As Integer = EgtCreateGroup(nSelPartId)
|
||||
' cancello eventuale gruppo precedente
|
||||
Dim nNewPathLayerId As Integer = EgtGetFirstNameInGroup(nSelPartId, "NewPathLayer")
|
||||
If nNewPathLayerId <> GDB_ID.NULL Then
|
||||
EgtEmptyGroup(nNewPathLayerId)
|
||||
Else
|
||||
nNewPathLayerId = EgtCreateGroup(nSelPartId)
|
||||
End If
|
||||
EgtSetName(nNewPathLayerId, "NewPathLayer")
|
||||
EgtSetCurrPartLayer(nSelPartId, nNewPathLayerId)
|
||||
InitCommand(True)
|
||||
InitCommand(False)
|
||||
Map.refSceneHostVM.MainController.SetContinue()
|
||||
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.LINE2P) Then
|
||||
m_bIsCreatingPath = True
|
||||
Else
|
||||
EgtErase(nNewPathLayerId)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -846,6 +846,8 @@ Public Class LeftPanelVM
|
||||
dPosX += WarehouseHelper.GetOffset(BeamMachGroup.nType)
|
||||
' lo aggiungo in fondo
|
||||
EgtSetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + nPartIndex + 1, nPartDuploIdList(nPartIndex) & "," & DoubleToString(dPosX, 3))
|
||||
' incremento posizione della sua lunghezza
|
||||
dPosX += PartsToAdd(nPartIndex).dL
|
||||
' conservo indice d'inserimento
|
||||
nInsertIndex = nIndex
|
||||
nPartIndex += 1
|
||||
|
||||
@@ -104,14 +104,14 @@ Public Class MyMachGroupVM
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
Dim p3OrigOnTab As Point3d
|
||||
Select Case CurrentMachine.OrigCorner
|
||||
'Case MCH_CR.BL
|
||||
' p3OrigOnTab = New Point3d(0, 0, 0)
|
||||
Case MCH_CR.BL
|
||||
p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.BR
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX(), 0, 0)
|
||||
'Case MCH_CR.TL
|
||||
' p3OrigOnTab = New Point3d(0, b3Tab.DimY(), 0)
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.TL
|
||||
p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.TR
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX(), b3Tab.DimY(), 0)
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
End Select
|
||||
EgtMoveToCornerRawPart(nRawPartId, p3OrigOnTab, CurrentMachine.OrigCorner)
|
||||
' sposto tutti i pezzi di quanto si e' accorciato il grezzo
|
||||
@@ -175,14 +175,14 @@ Public Class MyMachGroupVM
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
Dim p3OrigOnTab As Point3d
|
||||
Select Case CurrentMachine.OrigCorner
|
||||
'Case MCH_CR.BL
|
||||
' p3OrigOnTab = New Point3d(0, 0, 0)
|
||||
'Case MCH_CR.BR
|
||||
' p3OrigOnTab = New Point3d(b3Tab.DimX(), 0, 0)
|
||||
Case MCH_CR.BL
|
||||
p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.BR
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.TL
|
||||
p3OrigOnTab = New Point3d(0, b3Tab.DimY(), 0)
|
||||
p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.TR
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX(), b3Tab.DimY(), 0)
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
End Select
|
||||
EgtMoveToCornerRawPart(nRawPartId, p3OrigOnTab, CurrentMachine.OrigCorner)
|
||||
' sposto tutti i pezzi di quanto si e' accorciato il grezzo
|
||||
@@ -250,13 +250,27 @@ Public Class MyMachGroupVM
|
||||
Dim dValue As Double
|
||||
If StringToLen(value, dValue) Then
|
||||
Dim dOldValue As Double = MyMachGroupM.dStartCut
|
||||
' verifico se con il nuovo StartCut tutti i pezzi stanno nella barra
|
||||
Dim dTotLength As Double = 0
|
||||
For PartIndex = 0 To m_PartVMList.Count - 1
|
||||
Dim Part As PartVM = m_PartVMList(PartIndex)
|
||||
If PartIndex = 0 Then
|
||||
dTotLength += Part.dL + dValue
|
||||
Else
|
||||
dTotLength += Part.dL + Part.dOffset
|
||||
End If
|
||||
Next
|
||||
If Me.dL < dTotLength Then
|
||||
NotifyPropertyChanged(NameOf(sStartCut))
|
||||
Return
|
||||
End If
|
||||
MyMachGroupM.dStartCut = dValue
|
||||
If Not ReDrawBeamMachgroup() Then
|
||||
' rispristino vecchio valore
|
||||
MyMachGroupM.dStartCut = dOldValue
|
||||
ReDrawBeamMachgroup()
|
||||
NotifyPropertyChanged(NameOf(sStartCut))
|
||||
End If
|
||||
MyMachGroupM.dStartCut = dValue
|
||||
EgtDraw()
|
||||
If PartVMList.Count > 0 Then
|
||||
Dim Beam As PartVM = PartVMList(0)
|
||||
@@ -512,9 +526,7 @@ Public Class MyMachGroupVM
|
||||
nRawId = EgtGetFirstRawPart()
|
||||
End While
|
||||
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
||||
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then Return False
|
||||
|
||||
Return True
|
||||
Return ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False)
|
||||
End Function
|
||||
|
||||
Friend Sub MoveBeam(Beam As PartVM, MoveDirection As MoveDirections)
|
||||
|
||||
@@ -38,7 +38,7 @@ Public Class MainMenuVM
|
||||
Set(value As Boolean)
|
||||
If value Then
|
||||
If Not IsNothing(Map.refProjManagerVM.CurrProj) AndAlso Not IsNothing(Map.refProdManagerVM.CurrProd) AndAlso
|
||||
Map.refProjManagerVM.CurrProj.nProdId = Map.refProdManagerVM.CurrProd.nProdId Then
|
||||
Map.refProjManagerVM.CurrProj.nProdId = Map.refProdManagerVM.CurrProd.nProdId Then
|
||||
Map.refProjManagerVM.CurrProj.SetReloadProject(False)
|
||||
End If
|
||||
SelPage = Pages.VIEW
|
||||
@@ -53,7 +53,7 @@ Public Class MainMenuVM
|
||||
Set(value As Boolean)
|
||||
If value Then
|
||||
If Not IsNothing(Map.refProjManagerVM.CurrProj) AndAlso Not IsNothing(Map.refProdManagerVM.CurrProd) AndAlso
|
||||
Map.refProjManagerVM.CurrProj.nProdId = Map.refProdManagerVM.CurrProd.nProdId Then
|
||||
Map.refProjManagerVM.CurrProj.nProdId = Map.refProdManagerVM.CurrProd.nProdId Then
|
||||
Map.refProdManagerVM.CurrProd.SetReloadProject(False)
|
||||
End If
|
||||
SelPage = Pages.MACHINING
|
||||
@@ -244,7 +244,7 @@ Public Class MainMenuVM
|
||||
DimensionsIniFile.ReadGridDimensions(ConstDims.LEFTPANEL_VIEW, Map.refLeftPanelVM.GridDims)
|
||||
' apro progetto proj
|
||||
If Not IsNothing(Map.refProjManagerVM.CurrProj) Then
|
||||
If Map.refProjManagerVM.CurrProj.bReloadProject Then
|
||||
If Map.refProjManagerVM.CurrProj.bReloadProject OrElse Map.refConfigurationPageVM.QParametersModified Then
|
||||
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROJ, 2, EgtMsg(63005), 10, 100) ' Loading parts
|
||||
Map.refProjManagerVM.OpenProject(Map.refProjManagerVM.CurrProj)
|
||||
' aggiorno le colonne in base al tipo progetto
|
||||
@@ -257,6 +257,8 @@ Public Class MainMenuVM
|
||||
Map.refTopPanelVM.ManageQParamsRowVisibility(BWType.BEAM)
|
||||
Map.refPartInRawPartListVM.UpdateColumns(BWType.BEAM)
|
||||
End If
|
||||
' resetto modifica parametri Q default
|
||||
Map.refConfigurationPageVM.ResetQParametersModified()
|
||||
DbControllers.m_ProjController.LockByProjId(Map.refProjManagerVM.CurrProj.nProjId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||
Map.refProjManagerVM.NotifyPropertyChanged(NameOf(Map.refProjManagerVM.MruFileNames))
|
||||
Else
|
||||
@@ -329,7 +331,7 @@ Public Class MainMenuVM
|
||||
If Not IsNothing(Map.refProdManagerVM.CurrProd) AndAlso Not IsNothing(Map.refProdManagerVM.CurrProd.nProdId) AndAlso Map.refProdManagerVM.CurrProd.nProdId > 0 Then
|
||||
If File.Exists(Map.refProdManagerVM.CurrProd.sProdPath) Then
|
||||
' apro progetto
|
||||
If Map.refProdManagerVM.CurrProd.bReloadProject Then
|
||||
If Map.refProdManagerVM.CurrProd.bReloadProject OrElse Map.refConfigurationPageVM.QParametersModified Then
|
||||
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROD, 2, EgtMsg(63005), 10, 50) ' Loading parts
|
||||
Map.refProdManagerVM.TempCurrProd = Map.refProdManagerVM.CurrProd
|
||||
If Map.refSceneHostVM.MainController.OpenProject(Map.refProdManagerVM.CurrProd.sProdPath, False) Then
|
||||
@@ -337,6 +339,8 @@ Public Class MainMenuVM
|
||||
Map.refRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
||||
Map.refTopPanelVM.ManageQParamsRowVisibility(Map.refProjectVM.BTLStructureVM.nPROJTYPE <> BWType.BEAM)
|
||||
Map.refPartInRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
||||
' resetto modifica parametri Q default
|
||||
Map.refConfigurationPageVM.ResetQParametersModified()
|
||||
DbControllers.m_ProdController.LockByProdId(Map.refProdManagerVM.CurrProd.nProdId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||
Map.refProdManagerVM.NotifyPropertyChanged(NameOf(Map.refProdManagerVM.MruFileNames))
|
||||
End If
|
||||
@@ -372,6 +376,20 @@ Public Class MainMenuVM
|
||||
' aggiorno titolo
|
||||
Map.refMainWindowVM.UpdateTitle()
|
||||
DbControllers.m_ProdController.LockByProdId(Map.refProdManagerVM.CurrProd.nProdId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||
' controllo se devo lanciare verifica perche' importato
|
||||
Dim bGetVerifyResult As Boolean = False
|
||||
Dim bVerifyMach As Boolean = False
|
||||
Dim nBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
While nBTLInfoLayerId <> GDB_ID.NULL
|
||||
If EgtGetInfo(nBTLInfoLayerId, IMP_VERIFYMACHGROUP, bGetVerifyResult) AndAlso bGetVerifyResult Then
|
||||
If Not bVerifyMach Then bVerifyMach = True
|
||||
EgtSetInfo(nBTLInfoLayerId, IMP_VERIFYMACHGROUP, False)
|
||||
End If
|
||||
nBTLInfoLayerId = EgtGetNextName(nBTLInfoLayerId, BTLINFO)
|
||||
End While
|
||||
If bVerifyMach Then
|
||||
Map.refCALCPanelVM.VerifyAll()
|
||||
End If
|
||||
' seleziono prima barra
|
||||
Map.refProjectVM.MachGroupPanelVM.SelFirstMachGroup()
|
||||
Else
|
||||
|
||||
@@ -227,8 +227,8 @@ Public Class MainWindowM
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2501, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2501, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2503, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2503, 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.5.2.3")>
|
||||
<Assembly: AssemblyFileVersion("2.5.2.3")>
|
||||
<Assembly: AssemblyVersion("2.5.3.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.3.2")>
|
||||
|
||||
@@ -499,7 +499,7 @@ Public Class NestingRunningWndVM
|
||||
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
|
||||
Map.refProjectVM.BTLStructureVM.HideAll(True)
|
||||
End If
|
||||
Return
|
||||
Exit While
|
||||
End If
|
||||
|
||||
' passo al prossimo RawPart
|
||||
|
||||
@@ -532,7 +532,7 @@ Public Class ProjManagerVM
|
||||
' verifico se assemblato e lo annullo per salvataggio
|
||||
bShowBuilding = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
' se vista singolo pezzo
|
||||
' se vista singolo pezzo
|
||||
Else
|
||||
bShowSolid = Map.refShowBeamPanelVM.ShowSolid_IsChecked
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
@@ -596,7 +596,7 @@ Public Class ProjManagerVM
|
||||
.DefaultExt = ".btl",
|
||||
.Filter = "BTL (*.btl)|*.btl" &
|
||||
"|BTLX (*.btlx)|*.btlx",
|
||||
.InitialDirectory = If( Directory.Exists( sDir), sDir, ""),
|
||||
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True}
|
||||
If BTLDlg.ShowDialog() Then
|
||||
@@ -845,7 +845,7 @@ Public Class ProjManagerVM
|
||||
.DefaultExt = ".btl",
|
||||
.Filter = "BTL (*.btl)|*.btl" &
|
||||
"|BTLX (*.btlx)|*.btlx",
|
||||
.InitialDirectory = If( Directory.Exists( sDir), sDir, ""),
|
||||
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True}
|
||||
If BTLDlg.ShowDialog() Then
|
||||
@@ -1444,7 +1444,7 @@ Public Class ProjManagerVM
|
||||
' apro finestra scelta file
|
||||
Dim ImportDlg As New Microsoft.Win32.OpenFileDialog() With {.DefaultExt = ".ngexp",
|
||||
.Filter = "ProjectExport (*.ngexp)|*.ngexp",
|
||||
.InitialDirectory = If( Directory.Exists( sDir), sDir, ""),
|
||||
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True}
|
||||
If ImportDlg.ShowDialog() <> True Then Return
|
||||
@@ -1621,9 +1621,19 @@ Public Class ProjManagerVM
|
||||
For Each MachGroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
' aggiorno ProdId sui MachGroup
|
||||
EgtSetInfo(MachGroup.Id, MGR_RPT_PRODID, nProdId)
|
||||
' resetto tutti gli stati di CALC
|
||||
MachGroup.ResetCalcTotalMachGroup()
|
||||
If Map.refMainWindowVM.MainWindowM.nUserLevel < 5 OrElse GetMainPrivateProfileInt(S_MACH, K_EXPORTBWE, 0) <> 1 Then
|
||||
' resetto tutti gli stati di CALC
|
||||
MachGroup.ResetCalcTotalMachGroup()
|
||||
End If
|
||||
Next
|
||||
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 AndAlso GetMainPrivateProfileInt(S_MACH, K_EXPORTBWE, 0) = 1 Then
|
||||
' riporto info di futuro aggiornamento machgroup
|
||||
nBTLInfoLayerId = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
While nBTLInfoLayerId <> GDB_ID.NULL
|
||||
EgtSetInfo(nBTLInfoLayerId, IMP_VERIFYMACHGROUP, True)
|
||||
nBTLInfoLayerId = EgtGetNextName(nBTLInfoLayerId, BTLINFO)
|
||||
End While
|
||||
End If
|
||||
' salvo il progetto PROD
|
||||
EgtSaveFile(sProjFromPath(0), NGE.CMPTEXT)
|
||||
' copio file progetto
|
||||
@@ -1639,6 +1649,14 @@ Public Class ProjManagerVM
|
||||
bOk = False
|
||||
End Try
|
||||
End If
|
||||
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 AndAlso GetMainPrivateProfileInt(S_MACH, K_EXPORTBWE, 0) = 1 Then
|
||||
' copio tutti i bwe
|
||||
For Each CurrFile In Directory.GetFiles(sProjectimportDir)
|
||||
If Path.GetExtension(CurrFile) = ".bwe" OrElse Path.GetExtension(CurrFile) = ".html" Then
|
||||
File.Copy(CurrFile, sProdDir & "\" & Path.GetFileName(CurrFile))
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If bOk Then
|
||||
' aggiungo altri proj a prod
|
||||
For Each nProjId In NewProjIdList
|
||||
|
||||
@@ -261,7 +261,7 @@ Public Class ProjectVM
|
||||
If Not IsNothing(Map.refRawPartListVM.colRawPart_StartCut) Then
|
||||
Map.refRawPartListVM.colRawPart_StartCut.IsReadOnly = True
|
||||
End If
|
||||
If m_BTLStructureVM.nPROJTYPE <> BWType.BEAM AndAlso Not IsNothing(Map.refRawPartListVM.colRawPart_W) Then
|
||||
If Not IsNothing(Map.refRawPartListVM.colRawPart_W) Then
|
||||
Map.refRawPartListVM.colRawPart_W.IsReadOnly = True
|
||||
End If
|
||||
If Not IsNothing(Map.refRawPartListVM.colRawPart_L) Then
|
||||
@@ -308,7 +308,7 @@ Public Class ProjectVM
|
||||
If Not IsNothing(Map.refRawPartListVM.colRawPart_StartCut) Then
|
||||
Map.refRawPartListVM.colRawPart_StartCut.IsReadOnly = False
|
||||
End If
|
||||
If Not IsNothing(Map.refRawPartListVM.colRawPart_W) Then
|
||||
If m_BTLStructureVM.nPROJTYPE <> BWType.BEAM AndAlso Not IsNothing(Map.refRawPartListVM.colRawPart_W) Then
|
||||
Map.refRawPartListVM.colRawPart_W.IsReadOnly = False
|
||||
End If
|
||||
If Not IsNothing(Map.refRawPartListVM.colRawPart_L) Then
|
||||
|
||||
@@ -164,6 +164,7 @@ Public Class ShowBeamPanelVM
|
||||
' se necessario tolgo solido dal precedentemente selezionato
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso m_bShowSolid Then
|
||||
Map.refShowBeamPanelVM.SetShowSolid(False)
|
||||
Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
End If
|
||||
' nascondo barra del pezzo
|
||||
Map.refProjectVM.BTLStructureVM.SetSelectionType(BTLStructureVM.SelectionTypes.NULL)
|
||||
|
||||
@@ -39,6 +39,19 @@ Public Module CurrentMachine
|
||||
Return m_OrigCorner
|
||||
End Get
|
||||
End Property
|
||||
' Offset da origine tavola verso l'interno in X e Y
|
||||
Private m_dOrigOffsX As Double = 0
|
||||
Public ReadOnly Property OrigOffsX As Double
|
||||
Get
|
||||
Return m_dOrigOffsX
|
||||
End Get
|
||||
End Property
|
||||
Private m_dOrigOffsY As Double = 0
|
||||
Public ReadOnly Property OrigOffsY As Double
|
||||
Get
|
||||
Return m_dOrigOffsY
|
||||
End Get
|
||||
End Property
|
||||
' Posizione origine del grezzo per posizionamento pezzi
|
||||
Private m_NestingCorner As MCH_CR
|
||||
Public ReadOnly Property NestingCorner As MCH_CR
|
||||
@@ -267,9 +280,13 @@ Public Module CurrentMachine
|
||||
m_OrigCorner = MCH_CR.TR
|
||||
Case "BL"
|
||||
m_OrigCorner = MCH_CR.BL
|
||||
Case "BR"
|
||||
Case Else ' "BR"
|
||||
m_OrigCorner = MCH_CR.BR
|
||||
End Select
|
||||
m_dOrigOffsX = 0
|
||||
EgtLuaGetGlobNumVar("GWD.DELTA_X", m_dOrigOffsX)
|
||||
m_dOrigOffsY = 0
|
||||
EgtLuaGetGlobNumVar("GWD.DELTA_Y", m_dOrigOffsY)
|
||||
EgtLuaGetGlobStringVar("GWD.NESTING_CORNER", sTemp)
|
||||
Select Case sTemp
|
||||
Case "TL"
|
||||
@@ -278,15 +295,17 @@ Public Module CurrentMachine
|
||||
m_NestingCorner = MCH_CR.TR
|
||||
Case "BL"
|
||||
m_NestingCorner = MCH_CR.BL
|
||||
Case "BR"
|
||||
Case Else ' "BR"
|
||||
m_NestingCorner = MCH_CR.BR
|
||||
End Select
|
||||
EgtLuaGetGlobNumVar("GWD.MIN_HEIGHT", m_dMinRawH)
|
||||
EgtLuaGetGlobNumVar("GWD.MAX_HEIGHT", m_dMaxRawH)
|
||||
Else
|
||||
m_nViewDir = VT.ISO_SW
|
||||
m_OrigCorner = MCH_CR.BL
|
||||
m_NestingCorner = MCH_CR.BL
|
||||
m_OrigCorner = MCH_CR.BR
|
||||
m_dOrigOffsX = 0
|
||||
m_dOrigOffsY = 0
|
||||
m_NestingCorner = MCH_CR.BR
|
||||
m_dMinRawH = 5
|
||||
m_dMaxRawH = 500
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user