ERROR

Assertion "Valid Palette object" failed at line 447 of file "..\symwin\palette.c"

Last Published: April 25, 2020

Error Message

This error occurs when using the request Palette.MakeFromFile:

Assertion "ValidPalette object" failed at line 447 of file "..\symwin\palette.c"

Cause

The specified ODB file does not have a palette as the first object in the file, which is required by the Palette.MakeFromFile request.

Solution or Workaround



  1. Open a New Script window.
  2. Copy and paste this code into script window.

    Code:
    '-- This sample Avenue code demonstrates how to use the
    '-- Palette.MakeFromFile request with ODB files that have
    '-- palettes as the first object.

    "$AVHOME/symbols".asfilename.setcwd
    newFileName = filedialog.show("*.avp","ArcView Palette Files (*.avp)","")
    if(newFileName = nil) then
    return nil
    end

    testodb = odb.open(newFileName)
    firstobject = testodb.get(0)
    if(firstobject.is(Palette)) then
    newPalette = Palette.MakeFromFile(newFileName)
    end

  3. Compile and run script.

Article ID:000002510

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic