Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to convert selected features to graphics and keep the featuere symbology. I was thinking I could just call the UID command below, however it seems to not be working?

  Dim pUID As New UID
    Dim pCmdItem As ICommandItem
    ' Use the GUID of the Save command
    pUID.Value = "esriArcMapUI.FeaturesToGraphicsCommand"
    pUID.SubType = 3
    pCmdItem = My.ArcMap.Application.Document.CommandBars.Find(pUID)

Why does this command not work?

This code does the conversion, however it does not return the feature symbology to the graphic. What is the best method to perform this conversion while keeping the feature symbology in the new graphic?


share|improve this question
are you in data view? this does not work in layout view. You will also need to do a full refresh either manually or programatically. Your code should do what the default tool does minus the refresh... @Petr's answer below is the correct way to do this – Jakub Jan 17 '12 at 3:48
up vote 2 down vote accepted

The convert to graphics command relies on the feature renderer. See IFeatureRenderer.SymbolByFeature.

This means you will need to create the appropriate element instances (marker element, line element etc.) based on the geometry type, but the symbol will be provided by the renderer for every feature.

share|improve this answer
thank you for the link! – artwork21 Jan 24 '12 at 14:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.