Perhaps something along these lines?
If ThisApplication.ActiveDocumentType <> DocumentTypeEnum.kAssemblyDocumentObject Then
MessageBox.Show("THIS RULE '" & iLogicVb.RuleName & "' ONLY WORKS FOR ASSEMBLY DOCUMENTS.", "WRONG DOCUMENT TYPE", MessageBoxButtons.OK, MessageBoxIcon.Stop)
Return
End If
Dim oADoc As AssemblyDocument = ThisApplication.ActiveDocument
Dim oADef As AssemblyComponentDefinition = oADoc.ComponentDefinition
Dim oNamedFaces = ThisDoc.NamedEntities
Dim oOrigPlane As WorkPlane = oADef.WorkPlanes.Item(1)
Dim oUVector As UnitVector = oOrigPlane.Plane.Normal
Dim oOccs As ComponentOccurrences = oADef.Occurrences
For Each oOcc As ComponentOccurrence In oOccs
If oOcc.DefinitionDocumentType = DocumentTypeEnum.kPartDocumentObject Then
Dim oPDef As PartComponentDefinition = oOcc.Definition
If oPDef.HasMultipleSolidBodies = False Then
Dim oParams() As Double
Dim oNormals() As Double
For Each oFace As Face In oPDef.SurfaceBodies(1).Faces 'Assumes it't not MultiBody
If oFace.SurfaceType = SurfaceTypeEnum.kPlaneSurface Then
'oFace.Evaluator.GetNormal(oParams, oNormals)
'If oParams(1).Equals(obj)
'Then somehow compare this info to the Normal of your origin plane
'End If
If oOrigPlane.Plane.IsParallelTo(oFace) = True Then
If oNamedFaces.NameExists(oFaceName) = False Then
oNamedFaces.SetName(oFace,oFaceName)
End If
End If
End If
Next
End If
End If
Next
Wesley Crihfield

(Not an Autodesk Employee)