PrintRasterLayout.sml

  Download

More scripts: Layout

Syntax Highlighing:

comments, key words, predefined symbols, class members & methods, functions & classes
            
# Dan Glasser
# 24March03
# Gets an input raster, throw it into a layout, print the layout
class GRE_LAYOUT layout;
class GRE_GROUP gp;
raster R;
# Get the raster to print
GetInputRaster(R);
# Create the layout used to print the raster
layout = LayoutCreate("myLayout", 1);	# 1 for hardcopy
# Create group to add raster to
gp = GroupCreate("Any Group Name", layout);
# Add the raster to the group
GroupQuickAddRasterVar(gp, R);	# (GROUP name, raster)
# open up dialog to setup printer
numeric err = LayoutPageSetupDialog(layout);
if(err>=0)
	LayoutPrint(layout, 1);
GroupDestroy(gp);
LayoutDestroy(layout);