Option Explicit '[ Referencing ".dll" file(s) to the current rule and importing appropriate namespaces and/or static classes. AddReference "Tmim.Core.dll" Imports utility = Tmim.Core.Utilities.Utility '] Sub Main() '[ 'Variables declaration Dim cubeWidth As Double = 0 Dim cubeHeight As Double = 0 Dim cubeLength As Double = 0 Dim posSplitPanel As Double = 0 Dim thicknessSplitPanelAssy As Double = 2 Dim distFanFromPanel As Double = 4.75 Dim centerToCenterIsolatorHoleAxial As Double = 0 Select Case FanModelSize Case "Greenheck APM 15" cubeWidth = 34 cubeHeight = 34 cubeLength = 37 posSplitPanel = 34 Case "Greenheck APM 16" cubeWidth = 37 cubeHeight = 37 cubeLength = 39 posSplitPanel = 37 Case "Greenheck APM 18" cubeWidth = 40.4 cubeHeight = 40.4 cubeLength = 42 posSplitPanel = 40.4 Case "Greenheck APM 20" cubeWidth = 44 cubeHeight = 44 cubeLength = 45 posSplitPanel = 44 Case "Greenheck APM 22" cubeWidth = 48.4 cubeHeight = 48.4 cubeLength = 46 posSplitPanel = 48.4 Case "Greenheck APM 24" cubeWidth = 53 cubeHeight = 53 cubeLength = 48 posSplitPanel = 53 Case "Greenheck APM 27" cubeWidth = 58 cubeHeight = 58 cubeLength = 50 posSplitPanel = 58 Case "Greenheck APM 30" cubeWidth = 64 cubeHeight = 64 cubeLength = 54 posSplitPanel = 64 End Select '] '[ Calculated values for part dimensions and features specifications. Parameter("Height") = cubeHeight*2 - thicknessSplitPanelAssy Parameter("Length") = cubeLength Parameter("Width") = cubeWidth '] ' Split Panel Assembly Location Parameter("PosSplitPanel") = posSplitPanel ' Panels Parameter("PanelBottomAssy", "FanModelSize") = FanModelSize Parameter("PanelTopAssy", "FanModelSize") = FanModelSize Parameter("PanelSideAssy", "FanModelSize") = FanModelSize Parameter("SplitFanArrayPanelAssy", "FanModelSize") = FanModelSize Parameter("Fan", "FanModelSize") = FanModelSize iLogicVb.RunRule("PanelBottomAssy", "Main Update") iLogicVb.RunRule("PanelTopAssy", "Main Update") iLogicVb.RunRule("PanelSideAssy", "Main Update") iLogicVb.RunRule("SplitFanArrayPanelAssy", "Main Update") iLogicVb.RunRule("Fan", "Main Update") ' Fan Parameter("DistFanFromPanel") = distFanFromPanel centerToCenterIsolatorHoleAxial = Parameter("FanFloorMount_Sketch", "DistCcIsolatorHoleWidth") Parameter("FanSupport_Rev1", "DistCcIsolatorHoleWidth") = centerToCenterIsolatorHoleAxial ' Plate Inlet Parameter("PlateInlet", "Length") = Parameter("Width") Parameter("PlateInlet", "FanModelSize") = Parameter("FanModelSize") Parameter("PlateInlet_Top", "Length") = Parameter("Width") Parameter("PlateInlet_Top", "FanModelSize") = Parameter("FanModelSize") InventorVb.DocumentUpdate() End Sub