ArcObjects Library Reference  (System)    

IPropertySet.RemoveProperty Method

Removes a property from the set.

[Visual Basic 6.0]
Sub RemoveProperty(
    ByVal Name As String _
)
[Visual Basic .NET]
Public Sub RemoveProperty ( _
    ByVal Name As String _
)
[C#]
public void RemoveProperty (
    string Name
);
[Java]
public void removeProperty (
    String Name
)
throws
    IOException,
    AutomationException
[C++]
HRESULT RemoveProperty(
  BSTR Name
);
[C++]

Parameters

Name [in]

  Name is a parameter of type BSTR

Product Availability

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

Remarks

The Name parameter uses XSL Patterns to specify metadata elements.  Additional information on XSL can be found in the the IXmlPropertySet documentation.

If the Name parameter specifies an node that contains several elements, all sub-nodes will also be removed.  In the image below setting the Name parameter equal to "metainfo/metc/cntinfo" will remove all the ESRI contact information between the highlighted elements.

[Visual Basic 6.0]
'This small example uses the RemoveProperty method to delete 
'the specified element

    Dim pGxApp As IGxApplication
    Dim pGxObj As IGxObject
    Dim pMD As IMetadata
    Dim pPS As IPropertySet
    
    Set pGxApp = Application
    Set pGxObj = pGxApp.SelectedObject
    Set pMD = pGxObj
    Set pPS = pMD.Metadata

    'Removes the Title element
    pPS.RemoveProperty ("idinfo/citation/citeinfo/title")

    'save the metadata changes
    pMD.Metadata = pPS

See Also

IPropertySet Interface

Example

SetProperties Example

 


Feedback Send feedback on this page