luckyted

Export labels that should be invisible

Discussion created by luckyted on Feb 15, 2011
Latest reply on Feb 15, 2011 by luckyted
hi, there. i have implemented ESRI.Output.IExport and IExportPNG (ArcEngine 9.3) in C# (.NET Framework 3.5) for some special task, it works well but some side effects when outputting (using IActiveView.Output). that is, the Output method will draw labels that should be invisible.

for example, there is a map with layers "Capital" and "Cities" to be exported, where layer Capital should display all the time and layer Cities under 1:10000 ~ 1:30000 scale only, same are their labels. but when the job was done under scale 1 : 50000 (under such scale labels and features of Cities are invisible on ArcMap), the labels of the layer Cities was outputted (and the features wasn't).

when i use ExportPNGClass instead, everything goes well.

in that implementation, all what i do is creating a Bitmap, getting a Graphics object from it,  returning the graphics' hdc when StartExporting was called, releasing when FinishExporting, and disposing the Bitmap when Cleanup. no exceptions thrown, and the result is under expectation (but the extra labels).

it was strange, isn't it? could any body give me a hand?

thanks.

Ted

Outcomes