EgtDOORCreator 1.8l1 :

- I general dell'assemblato sono salvati come metadata (##) all'inizio del file,
- modifica relazioni hardware Jamb-Door
This commit is contained in:
Nicola Pievani
2017-12-04 11:36:47 +00:00
parent 1f5d25ed77
commit bdcce9b5ca
10 changed files with 498 additions and 482 deletions
+173 -42
View File
@@ -84,7 +84,7 @@ Friend Module DdfFile
' è specificato il tipo significa che abbiamo un assemblato
DdfFileContent.Add("piece: " & Part.TypePart)
DdfFileContent.Add("")
' posizionamento porte
If OptionModule.m_ConfigurationSoftware = ConfigType.Assembly Then
If Not IsNothing(Part.TypePart) Then
' il posizionamento della prima porta sta nell'origine
@@ -496,9 +496,16 @@ Friend Module DdfFile
Dim EndAssebly As New List(Of String)
EndAssebly.Add("")
EndAssebly.Add("...")
Dim FirstPart As Boolean = False
Dim GeneralAssembly As New List(Of String)
If OptionModule.m_ConfigurationSoftware = ConfigType.Assembly Then
WriteGeneralAssembly(GeneralAssembly, CurrAssembly)
File.WriteAllLines(sPath, GeneralAssembly, Text.Encoding.UTF8)
FirstPart = True
End If
' inizio stampando l'elenco delle porte
Dim FirstPart As Boolean = False
Select Case CurrAssembly.DoorNumber
Case "1"
WriteDDFPart(CurrAssembly.GetArrayPartDoor(0).Door, sPath, bIsTemplate, FirstPart)
@@ -523,6 +530,7 @@ Friend Module DdfFile
File.AppendAllLines(sPath, SplitPart, Text.Encoding.UTF8)
WriteDDFPart(CurrAssembly.RightJamb, sPath, bIsTemplate, FirstPart)
File.AppendAllLines(sPath, SplitPart, Text.Encoding.UTF8)
' il sill è stampato solo se è nella selezione
If CurrAssembly.Exterior Then
WriteDDFPart(CurrAssembly.TopJamb, sPath, bIsTemplate, FirstPart)
File.AppendAllLines(sPath, SplitPart, Text.Encoding.UTF8)
@@ -533,126 +541,249 @@ Friend Module DdfFile
File.AppendAllLines(sPath, EndAssebly, Text.Encoding.UTF8)
End If
'------------------------------------------------------------------------------------------------------------------
' inizio ora a stampare le caratteristiche generali della finestra JambPageVM
'' inizio ora a stampare le caratteristiche generali della finestra JambPageVM
'Dim dVal As Double = 0
'Dim GeneralAssembly As New List(Of String)
'GeneralAssembly.Add("")
'GeneralAssembly.Add("#GENERAL ASSEMBLY")
'GeneralAssembly.Add("")
'GeneralAssembly.Add(" " & "Size : ")
'If StringToDouble(CurrAssembly.Thickness, dVal) Then
' GeneralAssembly.Add(ConstCompo.K_SPACE3 & "thickness : " & DoubleToString(dVal, 5))
'Else
' MessageBox.Show(ConstCompo.K_SPACE3 & EgtMsg(50106) & "thickness", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
' Return False
'End If
'If StringToDouble(CurrAssembly.Width, dVal) Then
' GeneralAssembly.Add(ConstCompo.K_SPACE3 & "width : " & DoubleToString(dVal, 5))
'Else
' MessageBox.Show(ConstCompo.K_SPACE3 & EgtMsg(50106) & "width", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
' Return False
'End If
'GeneralAssembly.Add("")
'GeneralAssembly.Add(" " & "Light : ")
'If StringToDouble(CurrAssembly.LightUp, dVal) Then
' GeneralAssembly.Add(ConstCompo.K_SPACE3 & "up : " & DoubleToString(dVal, 5))
'Else
' MessageBox.Show(ConstCompo.K_SPACE3 & EgtMsg(50106) & "LightUp", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
' Return False
'End If
'If StringToDouble(CurrAssembly.LightLock, dVal) Then
' GeneralAssembly.Add(ConstCompo.K_SPACE3 & "lock : " & DoubleToString(dVal, 5))
'Else
' MessageBox.Show(EgtMsg(50106) & "LightLock", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
' Return False
'End If
'If StringToDouble(CurrAssembly.LightHinge, dVal) Then
' GeneralAssembly.Add(ConstCompo.K_SPACE3 & "hinge : " & DoubleToString(dVal, 5))
'Else
' MessageBox.Show(EgtMsg(50106) & "LightHinge", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
' Return False
'End If
'If StringToDouble(CurrAssembly.LightBottom, dVal) Then
' GeneralAssembly.Add(ConstCompo.K_SPACE3 & "bottom : " & DoubleToString(dVal, 5))
'Else
' MessageBox.Show(EgtMsg(50106) & "LightBottom", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
' Return False
'End If
'GeneralAssembly.Add("")
'GeneralAssembly.Add(" " & "Overlap : ")
'If StringToDouble(CurrAssembly.ThicknessHead, dVal) Then
' GeneralAssembly.Add(ConstCompo.K_SPACE3 & "thickness : " & DoubleToString(dVal, 5))
'Else
' MessageBox.Show(EgtMsg(50106) & "ThicknessHead", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
' Return False
'End If
'If StringToDouble(CurrAssembly.OverlapHinge, dVal) Then
' GeneralAssembly.Add(ConstCompo.K_SPACE3 & "hinge : " & DoubleToString(dVal, 5))
'Else
' MessageBox.Show(EgtMsg(50106) & "Overlap Hinge", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
' Return False
'End If
'If StringToDouble(CurrAssembly.OverlapLock, dVal) Then
' GeneralAssembly.Add(ConstCompo.K_SPACE3 & "lock : " & DoubleToString(dVal, 5))
'Else
' MessageBox.Show(EgtMsg(50106) & "Overlap Lock", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
' Return False
'End If
'If StringToDouble(CurrAssembly.DeltaThickness, dVal) Then
' GeneralAssembly.Add(ConstCompo.K_SPACE3 & "deltaT : " & DoubleToString(dVal, 5))
'Else
' MessageBox.Show(EgtMsg(50106) & "Delta Thickness", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
' Return False
'End If
'' i parametri associatia alla condizione di Exterior sono stampati solo se Exterior è true
'If CurrAssembly.Exterior Then
' GeneralAssembly.Add(" " & "Exterior :")
' If StringToDouble(CurrAssembly.OverlapTop, dVal) Then
' GeneralAssembly.Add(ConstCompo.K_SPACE3 & "top : " & DoubleToString(dVal, 5))
' Else
' MessageBox.Show(EgtMsg(50106) & "Overlap Top", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
' Return False
' End If
'End If
'GeneralAssembly.Add("")
'GeneralAssembly.Add(" " & ConstCompo.K_PROFILES & ":")
'GeneralAssembly.Add(ConstCompo.K_SPACE3 & ConstCompo.K_LOCKEDGE & ": " & CurrAssembly.LockEdgeType.Name)
'GeneralAssembly.Add(ConstCompo.K_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(CurrAssembly.LockEdgeMachining))
'If Not StringToDouble(CurrAssembly.LockEdgeOverMaterial, dVal) Then
' MessageBox.Show(EgtMsg(50106) & K_LOCKEDGEOVERMATERIAL_INI, EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
' Return False
'End If
'GeneralAssembly.Add(ConstCompo.K_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
'GeneralAssembly.Add(ConstCompo.K_SPACE3 & ConstCompo.K_HINGEEDGE & ": " & CurrAssembly.HingeEdgeType.Name)
'GeneralAssembly.Add(ConstCompo.K_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(CurrAssembly.HingeEdgeMachining))
'If Not StringToDouble(CurrAssembly.HingeEdgeOverMaterial, dVal) Then
' MessageBox.Show(EgtMsg(50106) & K_HINGEDGEOVERMATERIAL_INI, EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
' Return False
'End If
'GeneralAssembly.Add(ConstCompo.K_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
'GeneralAssembly.Add(ConstCompo.K_SPACE3 & ConstCompo.K_TOP & ": " & CurrAssembly.TopType.Name)
'GeneralAssembly.Add(ConstCompo.K_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(CurrAssembly.TopMachining))
'If Not StringToDouble(CurrAssembly.TopOverMaterial, dVal) Then
' MessageBox.Show(EgtMsg(50106) & K_TOPOVERMATERIAL_INI, EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
' Return False
'End If
'GeneralAssembly.Add(ConstCompo.K_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
'GeneralAssembly.Add(ConstCompo.K_SPACE3 & ConstCompo.K_BOTTOM & ": " & CurrAssembly.BottomType.Name)
'GeneralAssembly.Add(ConstCompo.K_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(CurrAssembly.BottomMachining))
'If Not StringToDouble(CurrAssembly.BottomOverMaterial, dVal) Then
' MessageBox.Show(EgtMsg(50106) & K_BOTTOMOVERMATERIAL_INI, EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
' Return False
'End If
'GeneralAssembly.Add(ConstCompo.K_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
'GeneralAssembly.Add("")
'If Not IsNothing(CurrAssembly.DoorNumber) Then
' GeneralAssembly.Add(" " & "doors : " & CurrAssembly.DoorNumber)
'Else
' MessageBox.Show(EgtMsg(50106) & "Number of Doors", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
' Return False
'End If
'File.AppendAllLines(sPath, GeneralAssembly, Text.Encoding.UTF8)
Return True
End Function
Public Function WriteGeneralAssembly(ByRef GeneralAssembly As List(Of String), CurrAssembly As Assembly) As Boolean
Dim dVal As Double = 0
Dim GeneralAssembly As New List(Of String)
GeneralAssembly.Add("")
GeneralAssembly.Add("#EGTDOORCREATOR")
GeneralAssembly.Add("#GENERAL ASSEMBLY")
GeneralAssembly.Add("")
GeneralAssembly.Add(" " & "Size : ")
GeneralAssembly.Add("#")
GeneralAssembly.Add(ConstCompo.K_METADATA & "Size : ")
If StringToDouble(CurrAssembly.Thickness, dVal) Then
GeneralAssembly.Add(ConstCompo.K_SPACE3 & "thickness : " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_METADATA & "thickness : " & DoubleToString(dVal, 5))
Else
MessageBox.Show(ConstCompo.K_SPACE3 & EgtMsg(50106) & "thickness", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
MessageBox.Show(ConstCompo.K_METADATA & EgtMsg(50106) & "thickness", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
If StringToDouble(CurrAssembly.Width, dVal) Then
GeneralAssembly.Add(ConstCompo.K_SPACE3 & "width : " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_METADATA & "width : " & DoubleToString(dVal, 5))
Else
MessageBox.Show(ConstCompo.K_SPACE3 & EgtMsg(50106) & "width", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
MessageBox.Show(ConstCompo.K_METADATA & EgtMsg(50106) & "width", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
GeneralAssembly.Add("")
GeneralAssembly.Add(" " & "Light : ")
GeneralAssembly.Add(ConstCompo.K_METADATA & "Light : ")
If StringToDouble(CurrAssembly.LightUp, dVal) Then
GeneralAssembly.Add(ConstCompo.K_SPACE3 & "up : " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_METADATA & "up : " & DoubleToString(dVal, 5))
Else
MessageBox.Show(ConstCompo.K_SPACE3 & EgtMsg(50106) & "LightUp", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
MessageBox.Show(ConstCompo.K_METADATA & EgtMsg(50106) & "LightUp", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
If StringToDouble(CurrAssembly.LightLock, dVal) Then
GeneralAssembly.Add(ConstCompo.K_SPACE3 & "lock : " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_METADATA & "lock : " & DoubleToString(dVal, 5))
Else
MessageBox.Show(EgtMsg(50106) & "LightLock", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
If StringToDouble(CurrAssembly.LightHinge, dVal) Then
GeneralAssembly.Add(ConstCompo.K_SPACE3 & "hinge : " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_METADATA & "hinge : " & DoubleToString(dVal, 5))
Else
MessageBox.Show(EgtMsg(50106) & "LightHinge", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
If StringToDouble(CurrAssembly.LightBottom, dVal) Then
GeneralAssembly.Add(ConstCompo.K_SPACE3 & "bottom : " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_METADATA & "bottom : " & DoubleToString(dVal, 5))
Else
MessageBox.Show(EgtMsg(50106) & "LightBottom", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
GeneralAssembly.Add("")
GeneralAssembly.Add(" " & "Overlap : ")
GeneralAssembly.Add(ConstCompo.K_METADATA)
GeneralAssembly.Add(ConstCompo.K_METADATA & "Overlap : ")
If StringToDouble(CurrAssembly.ThicknessHead, dVal) Then
GeneralAssembly.Add(ConstCompo.K_SPACE3 & "thickness : " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_METADATA & "thickness : " & DoubleToString(dVal, 5))
Else
MessageBox.Show(EgtMsg(50106) & "ThicknessHead", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
If StringToDouble(CurrAssembly.OverlapHinge, dVal) Then
GeneralAssembly.Add(ConstCompo.K_SPACE3 & "hinge : " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_METADATA & "hinge : " & DoubleToString(dVal, 5))
Else
MessageBox.Show(EgtMsg(50106) & "Overlap Hinge", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
If StringToDouble(CurrAssembly.OverlapLock, dVal) Then
GeneralAssembly.Add(ConstCompo.K_SPACE3 & "lock : " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_METADATA & "lock : " & DoubleToString(dVal, 5))
Else
MessageBox.Show(EgtMsg(50106) & "Overlap Lock", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
If StringToDouble(CurrAssembly.DeltaThickness, dVal) Then
GeneralAssembly.Add(ConstCompo.K_SPACE3 & "deltaT : " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_METADATA & "deltaT : " & DoubleToString(dVal, 5))
Else
MessageBox.Show(EgtMsg(50106) & "Delta Thickness", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
' i parametri associatia alla condizione di Exterior sono stampati solo se Exterior è true
If CurrAssembly.Exterior Then
GeneralAssembly.Add(" " & "Exterior :")
GeneralAssembly.Add(ConstCompo.K_METADATA & "Exterior :")
If StringToDouble(CurrAssembly.OverlapTop, dVal) Then
GeneralAssembly.Add(ConstCompo.K_SPACE3 & "top : " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_METADATA & "top : " & DoubleToString(dVal, 5))
Else
MessageBox.Show(EgtMsg(50106) & "Overlap Top", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
End If
GeneralAssembly.Add("")
GeneralAssembly.Add(" " & ConstCompo.K_PROFILES & ":")
GeneralAssembly.Add(ConstCompo.K_SPACE3 & ConstCompo.K_LOCKEDGE & ": " & CurrAssembly.LockEdgeType.Name)
GeneralAssembly.Add(ConstCompo.K_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(CurrAssembly.LockEdgeMachining))
GeneralAssembly.Add(ConstCompo.K_METADATA)
GeneralAssembly.Add(ConstCompo.K_METADATA & ConstCompo.K_PROFILES & ":")
GeneralAssembly.Add(ConstCompo.K_METADATA & ConstCompo.K_LOCKEDGE & ": " & CurrAssembly.LockEdgeType.Name)
GeneralAssembly.Add(ConstCompo.K_METADATA & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(CurrAssembly.LockEdgeMachining))
If Not StringToDouble(CurrAssembly.LockEdgeOverMaterial, dVal) Then
MessageBox.Show(EgtMsg(50106) & K_LOCKEDGEOVERMATERIAL_INI, EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
GeneralAssembly.Add(ConstCompo.K_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_SPACE3 & ConstCompo.K_HINGEEDGE & ": " & CurrAssembly.HingeEdgeType.Name)
GeneralAssembly.Add(ConstCompo.K_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(CurrAssembly.HingeEdgeMachining))
GeneralAssembly.Add(ConstCompo.K_METADATA & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_METADATA & ConstCompo.K_HINGEEDGE & ": " & CurrAssembly.HingeEdgeType.Name)
GeneralAssembly.Add(ConstCompo.K_METADATA & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(CurrAssembly.HingeEdgeMachining))
If Not StringToDouble(CurrAssembly.HingeEdgeOverMaterial, dVal) Then
MessageBox.Show(EgtMsg(50106) & K_HINGEDGEOVERMATERIAL_INI, EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
GeneralAssembly.Add(ConstCompo.K_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_SPACE3 & ConstCompo.K_TOP & ": " & CurrAssembly.TopType.Name)
GeneralAssembly.Add(ConstCompo.K_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(CurrAssembly.TopMachining))
GeneralAssembly.Add(ConstCompo.K_METADATA & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_METADATA & ConstCompo.K_TOP & ": " & CurrAssembly.TopType.Name)
GeneralAssembly.Add(ConstCompo.K_METADATA & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(CurrAssembly.TopMachining))
If Not StringToDouble(CurrAssembly.TopOverMaterial, dVal) Then
MessageBox.Show(EgtMsg(50106) & K_TOPOVERMATERIAL_INI, EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
GeneralAssembly.Add(ConstCompo.K_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_SPACE3 & ConstCompo.K_BOTTOM & ": " & CurrAssembly.BottomType.Name)
GeneralAssembly.Add(ConstCompo.K_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(CurrAssembly.BottomMachining))
GeneralAssembly.Add(ConstCompo.K_METADATA & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_METADATA & ConstCompo.K_BOTTOM & ": " & CurrAssembly.BottomType.Name)
GeneralAssembly.Add(ConstCompo.K_METADATA & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(CurrAssembly.BottomMachining))
If Not StringToDouble(CurrAssembly.BottomOverMaterial, dVal) Then
MessageBox.Show(EgtMsg(50106) & K_BOTTOMOVERMATERIAL_INI, EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
GeneralAssembly.Add(ConstCompo.K_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
GeneralAssembly.Add(ConstCompo.K_METADATA & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
GeneralAssembly.Add("")
GeneralAssembly.Add(K_METADATA)
If Not IsNothing(CurrAssembly.DoorNumber) Then
GeneralAssembly.Add(" " & "doors : " & CurrAssembly.DoorNumber)
GeneralAssembly.Add(K_METADATA & "doors : " & CurrAssembly.DoorNumber)
Else
MessageBox.Show(EgtMsg(50106) & "Number of Doors", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
File.AppendAllLines(sPath, GeneralAssembly, Text.Encoding.UTF8)
GeneralAssembly.Add(" ")
'File.AppendAllLines(sPath, GeneralAssembly, Text.Encoding.UTF8)
Return True
End Function