ArcObjects Library Reference  (System)    

IPropertySet.GetAllProperties Method

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
);
[C++]

Parameters

names [out]

  names is a parameter of type VARIANT

values [out]

  values is a parameter of type VARIANT

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

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.

[Visual Basic 6.0]
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

See Also

IPropertySet Interface

Example

GetAllProperties Example

 


Feedback Send feedback on this page