Error: Assertion "Valid Palette object" failed at line 447 of file "..\symwin\palette.c"
This error occurs when using the request Palette.MakeFromFile:
Assertion "ValidPalette object" failed at line 447 of file "..\symwin\palette.c"
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
- Open a New Script window.
- Copy and paste this code into script window.
'-- This sample Avenue code demonstrates how to use the
'-- Palette.MakeFromFile request with ODB files that have
'-- palettes as the first object.
newFileName = filedialog.show("*.avp","ArcView Palette Files (*.avp)","")
if(newFileName = nil) then
testodb = odb.open(newFileName)
firstobject = testodb.get(0)
newPalette = Palette.MakeFromFile(newFileName)
- Compile and run script.