diff --git a/EgtBEAMWALL.ViewerOptimizer/FeatureListManager/FeatureListManagerVM.vb b/EgtBEAMWALL.ViewerOptimizer/FeatureListManager/FeatureListManagerVM.vb index b26ded01..42525d5b 100644 --- a/EgtBEAMWALL.ViewerOptimizer/FeatureListManager/FeatureListManagerVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/FeatureListManager/FeatureListManagerVM.vb @@ -170,17 +170,22 @@ Public Class FeatureListManagerVM Private Sub CreateMacroTable() Dim nMacroW, nMacroH As Integer If Map.refProjectVM.BTLStructureVM.SelBTLPart.nROTATED = 0 OrElse Map.refProjectVM.BTLStructureVM.SelBTLPart.nROTATED = 180 Then - If Map.refProjectVM.BTLStructureVM.SelBTLPart.m_SelBTLFeatureVM.nSelSIDE = 1 OrElse Map.refProjectVM.BTLStructureVM.SelBTLPart.m_SelBTLFeatureVM.nSelSIDE = 3 Then - nMacroW = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlW - nMacroH = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlH - Else - nMacroW = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlH - nMacroH = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlW - End If - ElseIf Map.refProjectVM.BTLStructureVM.SelBTLPart.nROTATED = 90 OrElse Map.refProjectVM.BTLStructureVM.SelBTLPart.nROTATED = 270 Then - If Map.refProjectVM.BTLStructureVM.SelBTLPart.m_SelBTLFeatureVM.nSelSIDE = 1 OrElse Map.refProjectVM.BTLStructureVM.SelBTLPart.m_SelBTLFeatureVM.nSelSIDE = 3 Then - nMacroW = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlH - nMacroH = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlW + If Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.m_SelBTLFeatureVM) Then + If Map.refProjectVM.BTLStructureVM.SelBTLPart.m_SelBTLFeatureVM.nSelSIDE = 1 OrElse Map.refProjectVM.BTLStructureVM.SelBTLPart.m_SelBTLFeatureVM.nSelSIDE = 3 Then + nMacroW = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlW + nMacroH = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlH + Else + nMacroW = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlH + nMacroH = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlW + End If + ElseIf Map.refProjectVM.BTLStructureVM.SelBTLPart.nROTATED = 90 OrElse Map.refProjectVM.BTLStructureVM.SelBTLPart.nROTATED = 270 Then + If Map.refProjectVM.BTLStructureVM.SelBTLPart.m_SelBTLFeatureVM.nSelSIDE = 1 OrElse Map.refProjectVM.BTLStructureVM.SelBTLPart.m_SelBTLFeatureVM.nSelSIDE = 3 Then + nMacroW = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlH + nMacroH = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlW + Else + nMacroW = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlW + nMacroH = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlH + End If Else nMacroW = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlW nMacroH = Map.refProjectVM.BTLStructureVM.SelBTLPart.dBtlH