@Ralf_Krieg ,
Thank you for this code! It worked well. I had to do some unit conversion as it seems that Inventor works in metric but I was able to convert it over to imperial units.
I would like to ask a follow up question on this rule. This iLogic code works great when I create a forum and control the notch type at the part level but if I try to iLogic place this part into an assembly and control the notch type at the assembly level, I get the following error. It seems that it might have something to do with this portion of the code:
Dim oDoc As PartDocument = ThisApplication.ActiveDocument
Is there a way to add another line of code or modify the existing code to allow for this rule to work properly when the forum is launched at an assembly level?

The code for the rule that is having issues at the assembly level is listed below.
'Controls the bottom flange extents.
Dim oDoc As PartDocument = ThisApplication.ActiveDocument
Dim oCompDef As SheetMetalComponentDefinition = oDoc.ComponentDefinition
Dim oAfter As Object
Dim oBefore As Object
oCompDef.GetEndOfPartPosition(oAfter, oBefore)
Dim oFlangeFeature As FlangeFeature
For Each oFlangeFeature In oCompDef.Features.FlangeFeatures
If oFlangeFeature.Name = "Bottom Flange" Then
Exit For
End If
Next
If oFlangeFeature Is Nothing Then Exit Sub
oFlangeFeature.SetEndOfPart (True)
Dim oFlangeDef As FlangeDefinition = oFlangeFeature.Definition
Dim oEdge As Edge = oFlangeDef.Edges(1) 'assuming there is only one edge
Dim oOffsetEntOne As Object = oEdge.StartVertex
Dim oOffsetEntTwo As Object = oEdge.StopVertex
Select Case PlenumSidewallCornerNotchType
Case "Type A Back"
oFlangeDef.SetOffsetWidthExtent(oFlangeDef.Edges(1), oOffsetEntOne, (BttmFlangeNotch*2.54), oOffsetEntTwo, 0)
If Not oAfter Is Nothing Then
oAfter.SetEndOfPart (False)
ElseIf Not oBefore Is Nothing Then
oBefore.SetEndOfPart (True)
End If
Case "Type A Front"
oFlangeDef.SetOffsetWidthExtent(oFlangeDef.Edges(1), oOffsetEntOne, 0, oOffsetEntTwo, (BttmFlangeNotch*2.54))
If Not oAfter Is Nothing Then
oAfter.SetEndOfPart (False)
ElseIf Not oBefore Is Nothing Then
oBefore.SetEndOfPart (True)
End If
Case "Type A Both"
oFlangeDef.SetOffsetWidthExtent(oFlangeDef.Edges(1), oOffsetEntOne, (BttmFlangeNotch*2.54), oOffsetEntTwo, (BttmFlangeNotch*2.54))
If Not oAfter Is Nothing Then
oAfter.SetEndOfPart (False)
ElseIf Not oBefore Is Nothing Then
oBefore.SetEndOfPart (True)
End If
Case "Type B Back"
oFlangeDef.SetOffsetWidthExtent(oFlangeDef.Edges(1), oOffsetEntOne, 0, oOffsetEntTwo, 0)
If Not oAfter Is Nothing Then
oAfter.SetEndOfPart (False)
ElseIf Not oBefore Is Nothing Then
oBefore.SetEndOfPart (True)
End If
Case "Type B Front"
oFlangeDef.SetOffsetWidthExtent(oFlangeDef.Edges(1), oOffsetEntOne, 0, oOffsetEntTwo, 0)
If Not oAfter Is Nothing Then
oAfter.SetEndOfPart (False)
ElseIf Not oBefore Is Nothing Then
oBefore.SetEndOfPart (True)
End If
Case "Type B Both"
oFlangeDef.SetOffsetWidthExtent(oFlangeDef.Edges(1), oOffsetEntOne, 0, oOffsetEntTwo, 0)
If Not oAfter Is Nothing Then
oAfter.SetEndOfPart (False)
ElseIf Not oBefore Is Nothing Then
oBefore.SetEndOfPart (True)
End If
Case "Type C Both"
oFlangeDef.SetOffsetWidthExtent(oFlangeDef.Edges(1), oOffsetEntOne, 0, oOffsetEntTwo, 0)
If Not oAfter Is Nothing Then
oAfter.SetEndOfPart (False)
ElseIf Not oBefore Is Nothing Then
oBefore.SetEndOfPart (True)
End If
End Select
ThisApplication.ActiveView.Update