On further, more dynamic testing, I found that you were right about needing the secondary test, but I ended up putting that secondary test on the next line, after the "IsNot Nothing" test, because it was throwing the "Object Reference not set to an instance of an object" error, when I did it on the same line, due to it trying to get a "Count" from a non-existent "ExpressionList".
With that in mind, I created another fun/informative code that one could use to copy/transfer all multi-value parameters to another document, or Excel spreadsheet. It incorporates a 'Dictionary', to store the parameter's name, and a list of all of its options within each dictionary entry. That dictionary could then be sent to another routine that would populate some other document or spreadsheet.
I'm sure you've also noticed that I've been using a longer route to get the 'Parameters' variable. This is because I also work with Parameters within my Drawing documents, and you have to retrieve them a slightly different way, and I wanted my example codes to be a bit more universal, for my (and others) use later.
Here's that code:
Dim oDocType As DocumentTypeEnum = ThisApplication.ActiveDocumentType
Dim oParams As Parameters
If oDocType = DocumentTypeEnum.kPartDocumentObject Or _
oDocType = DocumentTypeEnum.kAssemblyDocumentObject Then
oParams = ThisApplication.ActiveDocument.ComponentDefinition.Parameters
ElseIf oDocType = DocumentTypeEnum.kDrawingDocumentObject Then
oParams = ThisApplication.ActiveDocument.Parameters
End If
Dim oMVParams As New Dictionary(Of String, List(Of String))
For Each oParam As Inventor.Parameter In oParams
If oParam.ExpressionList IsNot Nothing Then
If oParam.ExpressionList.Count > 0 Then
oMVParams.Add(oParam.Name, oParam.ExpressionList.GetExpressionList.ToList)
End If
End If
Next
'this is just to confirm it was successful, and show how to work with this type of Object
For Each oPair As KeyValuePair(Of String, List(Of String)) In oMVParams
oChosen = InputListBox(" ", oPair.Value, " ", " ", oPair.Key & " Options")
Next
If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.
Wesley Crihfield

(Not an Autodesk Employee)