HOW TO
This article shows how to print only the selected records of a table using an Avenue script.
Code:
theTable = av.getactivedoc
theTable.PromoteSelection
theVtab = theTable.GetVtab
thebitmap = theVtab.getselection
theCount = theBitMap.Count
theNewVtab = theVtab.Export("Temp.dbf".asFileName, DBASE, TRUE)
theNewTable = Table.Make(theNewVtab).setname("Query Results")
TheDoc = av.GetProject.finddoc("Query Results")
TheDoc.GetWin.Open
ThePrint = TRUE
ThePrint = MsgBox.YesNo("Would You Like To print The Table?", "Info", True)
If (ThePrint) then
d = av.GetActiveDoc
if (0 <= Printer.The.Edit({d.GetName})) then
av.ShowMsg("Printing "+d.GetName+"...")
av.UseWaitCursor
System.RefreshWindows
d.Print
av.ShowMsg("")
end
end
av.getProject.RemoveDoc(TheDoc)
Article ID:000004211
Get help from ArcGIS experts
Download the Esri Support App