3

I have around 50 mxd file that is done some times earlier. The text font used in labeling was not licensed. Now I can Change the text in layout element. But it has also some text in map view too. But arcpy.mapping.ListLayoutElements can not find the text document.

Is there any solution in arcpy?

  • 2
    is your text in the map view stored as a label or as an annotation ? – radouxju Feb 18 '14 at 9:36
  • Or is it perhaps graphic text that you are seeing in Data View? Please edit your Question to provide more details. – PolyGeo Feb 18 '14 at 19:54
  • This is a significant question that deserves in depth exploration. Answerers please don't restrict to the specific details in the question as originally asked. In any sizeable collection of mxd's it can be assumed that all text types will be have been used -- map annotation, feature class annotation, graphic elements -- and that they all need to be processed to identify and change the transgressing font faces used. (However please do be clear which type your solution addresses.) – matt wilkie Feb 18 '14 at 21:52
  • The text in active view is not a Annotation. It is not also graphic element. The mxds are created Long before and I do not have an idea who did it. Now I can Change the font face that I can select. But not the texts those are inserted directly in active view. – Shiuli Pervin Feb 21 '14 at 10:23
3

You are not going to be able to do this with arcpy because it does not expose the necessary interfaces.

With ArcObjects you could iterate over the layers and elements in a map and check font properties for the offending font name and update it accordingly. Some of the interfaces involved would likely include:

  • IActiveView
  • IMap
  • ILayer
  • IGeoFeatureLayer
  • IAnnotateLayerPropertiesCollection
  • IAnnotateLayerProperties
  • IGraphicsContainer
  • IElement
  • ITextElement
  • ITextSymbol
  • stdole.IFontDisp

Now, consider how many developer hours this will take to develop, test and implement what is essentially a one-off operation vs. your doing it manually. My guess is you will end up doing it manually :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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