由于您已经获得了文档,因此您可以使用两个 For-Each-Loops 来遍历 PropertySets 和其中的 Properties,例如:
Dim oPropSets As PropertySets
oPropSets = oDoc.PropertySets
Dim oPropSet As PropertySet
For Each oPropSet In oPropSets
Dim oPartProp As Inventor.Property
For Each oPartProp In oPropSet
Dim oPropertyValue As Object
If oPartProp.Value Is Nothing Then
'NullValue-Properties are ignored
ElseIf oPartProp Is Nothing Then
'Null-Properties are ignored too
ElseIf System.String.Equals(oPartProp.Value.ToString.Trim, "") Then
'Properties with empty values are also ignored
Else
'And here you have your Property:
Debug.Print(oPartProp.Name & "=" & oPartProp.Value.ToS5tring & vbLf)
End If
Next
Next