PRINTER Device Causes Error

Name: David Fanning	
E-mail Address: david@dfanning.com
IDL version: 6.0
Platform and OS: Windows 2000, Windows XP

Description of Behavior: 

Loading a color table (or color) with the TVLCT command while in the PRINTER device causes this error: % TVLCT: Error creating device colortable.

Oddly, the test program does not cause an error the FIRST time it is run in a new IDL session, only on subsequent times!! IDL> .COMPILE "C:\IDL\David\test.pro" % Compiled module: TEST. IDL> test IDL> test % TVLCT: Error creating device colortable. % Execution halted at: TEST 4 C:\IDL\David\test.pro

The problem appears to be confined to the Windows platform only. Example Code: PRO Test thisDevice = !D.Name Set_Plot, 'PRINTER' TVLCT, 255, 255, 0, 200 Set_Plot, thisDevice END Know Workarounds or Fixes:

None currently known, except to not load color tables while in the printer device. In my program HISTOIMAGE, I have worked around the problem by identifying these three lines in the code: axisColor = GetColor(axisColorName, !D.Table_Size-2) dataColor = GetColor(datacolorName, !D.Table_Size-3) backColor = GetColor(backColorName, !D.Table_Size-4) And replacing them with this: IF !D.NAME NE 'PRINTER' THEN BEGIN axisColor = GetColor(axisColorName, !D.Table_Size-2) dataColor = GetColor(datacolorName, !D.Table_Size-3) backColor = GetColor(backColorName, !D.Table_Size-4) ENDIF ELSE BEGIN Set_Plot, 'Z', /Copy axisColor = GetColor(axisColorName, !D.Table_Size-2) dataColor = GetColor(datacolorName, !D.Table_Size-3) backColor = GetColor(backColorName, !D.Table_Size-4) Set_Plot, 'PRINTER', /Copy ENDELSE RSI Technical Support Response:

It seems that this is logged in the system as a defect. Interestingly, you are the first customer to report the issue.

I have associated you with CR 19330. [Your test program] fails, at least for me, in IDL 5.5, 5.6, and 6.0. If you have any of the older versions around could you let me know if you are seeing the same behaviour? [I do, now that you mention it!]

As always, I highly recommend that you encourage customers who are seeing the same issue to contact us. Our development group is definitely influenced by the number of customers associated with a CR.

[Return to Table of Contents]

Last Updated 1 March 2004