OK. I think I may have something you can use for this situation.
Try the following code for your Door Length rule. Or temporarily Suppress that rule and create another one to place this code into.
'This line is just added to automatically fire this rule every time the length Parameter changes.
oDummyVariable1 = length
Dim oDoc As PartDocument = ThisApplication.ActiveDocument
Dim oCompDef As PartComponentDefinition = oDoc.ComponentDefinition
Dim oFeatures As PartFeatures = oCompDef.Features
For Each oFeature As PartFeature In oFeatures
If oFeature.Suppressed = False Then
oFeature.Suppressed = True
End If
Next
oFileName = "C:\Work\Project Data\Managed Scripts\Product Engineering\Louver Door.xlsx"
oSheetName = "Louver Door"
GoExcel.Open(oFile, oSheet)
GoExcel.DisplayAlerts = False
GoExcel.TitleRow = 3 'The Row that contains the Column Names
GoExcel.FindRowStart = 4 'The 1st Row containing Data
'Finds the row number that contains the specified data
i = GoExcel.FindRow(oFile, oSheet, "ASSEMBLY LENGTH", "=", Parameter.Param("length").Value.ToString)
oStarterLouver3 = GoExcel.CurrentRowValue("1245692").ToString
If oStarterLouver3 Is Nothing Then
ElseIf oStarterLouver3 = 1 Then
Feature.IsActive("1245692") = True
iProperties.Value("Custom", "Starter Profile") = "1245692"
End If
oStarterLouver2 = GoExcel.CurrentRowValue("1245782").ToString
If oStarterLouver2 Is Nothing Then
ElseIf oStarterLouver2 = 1 Then
Feature.IsActive("1245782") = True
iProperties.Value("Custom", "Starter Profile") = "1245782"
End If
oCenterLouver2 = GoExcel.CurrentRowValue("1245780").ToString
If oCenterLouver2 Is Nothing Then
iProperties.Value("Custom", "Center Profile2") = "None"
ElseIf oCenterLouver2 = 1 Then
Feature.IsActive("1245780") = True
iProperties.Value("Custom", "Center Profile2") = "1245780"
End If
Feature.IsActive("1245690") = True
iProperties.Value("Custom", "Finish Profile2") = "1245690"
iProperties.Value("Custom", "Starter Profile") = "1245691"
oCenterLouver3 = GoExcel.CurrentRowValue("1245691").ToString
centerCount = Val(oCenterLouver3)
Dim oNum As Integer = 1
For oNum = 1 To Val(oCenterLouver3)
Feature.IsActive("1245691:" & oNum) = True
Next
GoExcel.Close
'Output Parameters values from this rule to the Model. (Use this before Document Update)
RuleParametersOutput()
'Immediately update the current document.
InventorVb.DocumentUpdate()
This seems like a painfully complex way of doing what I'm imagining your trying to do.
Is there some reason you can't use your centerCount Parameter to drive your sketched pattern quantity of the CenterLouver3 feature. I'm also thinking that, because of the patterns within the spreadsheet, you may be able to use mathematical means to controll this configuration, instead of an external spreadsheet. Just a thought.
I usually always work with exteranal rules instead of local rules, so if something is throwing errors about data type mismatch or something, try deleting the ".ToString", Val(), & Parameter.Param() stuff to see if it will accept that straight values. iLogic says that the Value in these cases is an Object, instead of a String or Double or Integer, that's why I wrote those lines that way.
I hope this helps.
If this solves your problem or answers your questions, please select 'Accept As Solution'.
Or if this helps you along the way to reaching your solution, please click 'Like'.
Wesley Crihfield

(Not an Autodesk Employee)