Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

@karl.leduc-berard,

 

Hope this below code may be helpful.

Function fuFindPartParam(ByVal sVar1 As String, ByVal sVar2 As String, ByVal sVar3 As String) As String
 

Dim oDoc As AssemblyDocument
oDoc = ThisDoc.Document
Dim oComps As ComponentOccurrences
oComps = oDoc.ComponentDefinition.Occurrences


For Each oComp In oComps
    If oComp.Name = sVar3 Then
        For Each oParameter In oComp.Definition.Parameters 
             If oParameter.Name.Contains(sVar1) Or oParameter.Name.Contains(sVar2) Then
                   Return oParameter.Name
             End If
        Next
    End If
Next

 

End Function

Thanks and regards


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network