Hi @donaldleigh
I don't know how you want to specify that list of parameters. The way i wrote it now is that all parameters you want to be copied from the top assemblys userparameters should have a name that starts with "XX". So if you have a userparameter named XX_testparam, that will be copied.
Dim CopyParams As String = "XX" 'The program will copy all user parameters in top assembly that starts with this string
Dim oAsm As AssemblyDocument = ThisDoc.Document
For Each oDoc As Document In oAsm.AllReferencedDocuments
If (oDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject AndAlso oDoc.ComponentDefinition.IsContentMember = False) _
Or oDoc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject
If oAsm.ComponentDefinition.Occurrences.AllReferencedOccurrences(oDoc).Count > 0
For Each oParam As Inventor.Parameter In oAsm.ComponentDefinition.Parameters.UserParameters
If oParam.Name.StartsWith(CopyParams)
Dim docParam As Inventor.Parameter
Try
docParam = oDoc.ComponentDefinition.Parameters.UserParameters.Item(oParam.Name)
docParam.Value = oParam.Value
Catch
docParam = oDoc.ComponentDefinition.Parameters.UserParameters.AddByValue(oParam.Name, oParam.Value, oParam.Units)
End Try
End If
Next
End If
End If
Next
iLogicVB.UpdateWhenDone = True