'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Script Name: Layout.DoPrint ' Script Description: Creates layout at nearest even scale to current ' display scale with details, prints to default printer ' Run as View | Popup ( Layout and Print ) ' Programmer: Tom Kralidis ' Date Created: 01 Nov. 1999 ' Returned Object: none ' ' Changes: ' ' Author Date Details ' ' T. Kralidis 01-Nov-1999 Initial Implementation ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' make layout theLayout = Layout.Make theDisplay = theLayout.GetDisplay theDisplay.SetPageSize(8.5@11) thePageExtent = theDisplay.ReturnPageExtent thePageOrigin = thePageExtent.ReturnOrigin ' add view theRect = Rect.Make((thePageOrigin + (0.75@1.5)),(7@5)) theVFrame = ViewFrame.Make(theRect) theVFrame.SetView(av.GetProject.FindDoc("US Cities"), true) theGraphicShape = GraphicShape.Make(theRect) theLayout.GetGraphics.Add(theVFrame) theLayout.GetGraphics.Add(theGraphicShape) ' add legend theLegendRect = Rect.Make((thePageOrigin + (2.5@6.5)),(4@4)) theLegendFrame = LegendFrame.Make(theLegendRect) theLegendFrame.SetViewFrame(theVFrame) theLayout.GetGraphics.Add(theLegendFrame) ' add scale bar theSBRect = Rect.Make((thePageOrigin + (1.75@0.75)), (0.5@8)) theSBFrame = ScaleBarFrame.make(theSBRect) theSBFrame.SetViewFrame(theVFrame) theSBFrame.SetStyle(#SCALEBARFRAME_STYLE_HOLLOW) theSBFrame.SetUnits(#UNITS_LINEAR_MILES) theSBFrame.SetIntervals(5) theSBFrame.SetInterval(800) theSBFrame.SetDivisions(4) theLayout.GetGraphics.Add(theSBFrame) ' add title theTitleRect = Rect.Make((thePageOrigin + (2@8)),(2@4)) theTitleCenter = theTitleRect.ReturnCenter theTitle = GraphicText.Make("US Cities", theTitleCenter) theTitleTextSymbol = theTitle.ReturnSymbols.Get(0) theTitleTextSymbol.SetSize(46) theLayout.GetGraphics.Add(theTitle) theLayout.Invalidate ' print to default printer theLayout.Print