The name and value of all the properties in the property set.
[Visual Basic 6.0] Sub GetAllProperties(
names As Variant, _
values As Variant _
)
[Visual Basic .NET] Public Sub GetAllProperties ( _ ByRef names As Object, _ ByRef values As Object _ )
[C#] public void GetAllProperties ( ref object names, ref object values );
[Java] public void getAllProperties ( Object names, Object values ) throws IOException, AutomationException
[C++]
HRESULT GetAllProperties(
VARIANT* names,
VARIANT* values
);
Parameters
names [out]
names is a parameter of type VARIANT
values [out]
values is a parameter of type VARIANT
The GetAllProperties retrieves all names and values in the property set.
The Name parameter for the GetAllProperties method uses XSL Patterns. More information is available through the IXmlPropertySet documentation.
Public Sub GetFirstTenProperties()
Dim pGxApp As IGxApplication
Dim pGxObj As IGxObject
Dim pMD As IMetadata
Dim pPS As IPropertySet
Dim vaValue As Variant
Dim strName As String
Dim sValue As String
Dim vName As Variant
Dim i As Integer
Dim strValues(9) As String
Dim strFinal as String
Dim strNames(9) As String
Set pGxApp = Application
Set pGxObj = pGxApp.SelectedObject
Set pMD = pGxObj
Set pPS = pMD.Metadata
'retrieve all names and values for the PropertySet
pPS.GetAllProperties vName, vValue
'Displays only the first ten Element Names
For Each v In vName
strNames(i) = CVar(v)
i = i + 1
If i = 10 Then
Exit For
End If
Next
i = 0
'Display only the first ten Element Values
For Each v In vValue
strValues(i) = CVar(v)
i = i + 1
If i = 10 Then
Exit For
End If
Next
i = 0
strFinal = "Names: Values" & vbNewLine
For Each v In vValue
strFinal = strFinal & strNames(i) & ": " & strValues(i) & vbNewLine
i = i + 1
If i = 10 Then
Exit For
End If
Next
MsgBox strFinal
End Sub