diff --git a/CompoMatch.vb b/CompoMatch.vb index 7e02695..c01aa97 100644 --- a/CompoMatch.vb +++ b/CompoMatch.vb @@ -60,7 +60,9 @@ Module CompoMatch For IndexItemList = 0 To CombPar.ItemList.Count - 1 ' dal parametro scritto nella grafica ricavo il valore del ddf If CombPar.ItemList(IndexItemList) = CombPar.SelItem Then - EgtLuaSetGlobStringVar("STU.Side", CombPar.ItemListDDF(IndexItemList)) + If IndexItemList <= (CombPar.ItemListDDF.Count - 1) Then + EgtLuaSetGlobStringVar("STU.Side", CombPar.ItemListDDF(IndexItemList)) + End If Exit For End If Next diff --git a/DdfFile.vb b/DdfFile.vb index f6bad5a..1e19cb5 100644 --- a/DdfFile.vb +++ b/DdfFile.vb @@ -32,7 +32,8 @@ Friend Module DdfFile Friend Sub WriteDDFPart(Part As Part, sPath As String, bIsDDF As Boolean, bIsForAssembly As Boolean) - If Not OptionModule.m_ConfigurationSoftware = ConfigType.Assembly Then + 'if Not OptionModule.m_ConfigurationSoftware = ConfigType.Assembly AndAlso + If Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nDDFPage Then ReportList.Clear() 'ReportDoor.Order.Clear() diff --git a/DoorParameters/Compo.vb b/DoorParameters/Compo.vb index 57ca652..2ea487b 100644 --- a/DoorParameters/Compo.vb +++ b/DoorParameters/Compo.vb @@ -2623,7 +2623,8 @@ Public Class ComboBoxParam CurrCompo.SetTemplateSelItem(CurrCompo.TemplateSelItem) If TypeOf CmpPar Is ComboBoxParam Then Dim IndexItemDDF As Integer = DirectCast(CmpPar, ComboBoxParam).ItemList.IndexOf(m_SelItem) - If IndexItemDDF > -1 Then + If IndexItemDDF > -1 AndAlso + IndexItemDDF <= DirectCast(CmpPar, ComboBoxParam).ItemListDDF(IndexItemDDF).Count - 1 Then sSide = DirectCast(CmpPar, ComboBoxParam).ItemListDDF(IndexItemDDF) End If End If