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 am loading a ".avl" legend file into ArcView 3.1 and I am plagued with a recurring Segmentation Violation Error when I execute the updatelegend command in the theme.

It looks like the legend file was successfully loaded (evidenced by the updated legend thumbnail on the theme name in the view), but the actual image in the view does not update. If I double-click on the theme and click the "apply" button in the legend editor, then it works no problem, but I can't get the code to work!

The sample code is:

theView = av.GetActiveDoc
x = theView.GetThemes.Get(0)
theLegend = x.GetLegend

chk = theLegend.Load("C:\ArcView\Legend1.avl".AsFileName , #LEGEND_LOADTYPE_ALL)

if (chk) then 


share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.