There are two ways to get the Face object you need, you can choose which you like:
1. Use the Face.GetReferenceKey to get the reference-key for a Face, and then when you need to find the Face you can use the ReferenceKeyManager.BindKeyToObject to retrieve the Face. Below VBA sample demonstrates how to use the reference key:
Public Sub CreateReferenceKey()
'Set a reference to the active document
Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument
Dim refKeyMgr As ReferenceKeyManager
Set refKeyMgr = oDoc.ReferenceKeyManager
' Create a key context (required to obtain ref keys for BRep entities)
Dim keyContext As Long
keyContext = refKeyMgr.CreateKeyContext
Dim keyCollection As New Collection
Dim oFace As Face
For Each oFace In oDoc.ComponentDefinition.SurfaceBodies(1).Faces
' Get a reference key
Dim refKey() As Byte
Call oFace.GetReferenceKey(refKey, keyContext)
' Store all the ref keys
keyCollection.Add refKey
Next
' Save KeyContext as a byte array for future use
Dim ContextData() As Byte
Call oDoc.ReferenceKeyManager.SaveContextToArray(keyContext, ContextData)
' Load the saved KeyContext
Dim savedKeyContext As Long
savedKeyContext = oDoc.ReferenceKeyManager.LoadContextFromArray(ContextData)
Dim tempKey As Variant, key() As Byte, retObj As Object
' Bind back the objects
For Each tempKey In keyCollection
key = tempKey
Set retObj = oDoc.ReferenceKeyManager.BindKeyToObject(key, savedKeyContext)
oDoc.SelectSet.Select retObj
Next
End Sub
2. Add attribute to a Face and then you can retrieve it using the AttributeManager.FindObjects. You can add a special value(GUID or other unique value) to the attribute so you can retrieve the unique Face.
Hope the above helps.
If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.
Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.