AutoShapes Collection
Within automation, graphic drawing and graph objects are called shapes.
The AutoShapes collection contains all of the drawing and graph objects
in a document. This object is also used to create new shapes and add them
to the collection. There is a unique method to create each type of shape.
Methods exist to enumerate all the shapes in the collection, add objects
to the AutoSelection collection,
and create new drawing and graph shapes.
Properties
Application
Count
Parent
Methods
Add3DBarChartGraph
Add3DBubblePlotGraph
Add3DDoughnutPlot
Add3DFloatingBarGraph
Add3DFunctionPlotGraph2
Add3DHistogramGraph
Add3DLinePlotGraph
Add3DPieChart
Add3DStepPlotGraph
Add3DXYZBarChartGraph
Add3DXYZFloatingBarChartGraph
AddBarChartGraph
AddBoxWhiskerGraph2
AddBubblePlotGraph
AddClassPlotGraph
AddContourDataMapGraph
AddContourFuncMapGraph
AddContourGridMapGraph
AddDoughnutPlot
AddDurovClassGraph
AddDurovGraph
AddEllipse
AddextednedDurovClassGraph
AddextendedDurovGraph
AddFloatingBarGraph
AddFunctionPlotGraph2
AddHighLowGraph
AddHistogramGraph
AddInsetZoom
AddLegend
AddLinePlotGraph
AddOLEObject
AddPieChart
AddPiperClassGraph
AddPiperGraph
AddPolarBarChartGraph
AddPolarClassPlotGraph
AddPolarFunctionGraph
AddPolarPlotGraph
AddPolarVectorGraph
AddPolygon
AddPolyline
AddQQPlotGraph
AddRadarGraph
AddRectangle
AddRoseDiagramGraph
AddSplinePolygon
AddSplinePolyline
AddStepPlotGraph
AddStiffPlotGraph
AddSurfaceDataMapGraph
AddSurfaceFuncMapGraph
AddSurfaceGridMapGraph
AddSymbol
AddTernaryBubbleGraph
AddTernaryClassGraph
AddTernaryGraph
AddText
AddVectorPlotGraph
AddWindChartGraph
AddXYZClassPlotGraph
AddXYZPlotGraph
AddXYZVectorPlotGraph
BlockSelect
DisperseLabels
ResetLabelPositions
InvertSelection
Item
Paste
SelectAll
StopEditingGroup
Example
The following script demonstrates how the AutoShapes collection is used.
Sub
Main
'Declares
GrapherApp as an object
Dim GrapherApp As Object
'Creates
an instance of the Grapher Application object
'and
assigns it to the variable named "GrapherApp"
Set GrapherApp
= CreateObject("Grapher.Application")
'Make
Grapher visible
GrapherApp.Visible
= True
'Declare
Docs as Object
Dim Docs As Object
'Assigns the Documents collection to
'the variable named "Docs"
Set Docs = GrapherApp.Documents
'Declare Plot as Object
Dim Plot As Object
'Creates
a new plot window
Set Plot = Docs.Add(grfPlotDoc)
'Declares
Shapes as an object
Dim Shapes as Object
'Assigns the AutoShapes collection to
'the variable named "Shapes"
Set Shapes = Plot.Shapes
End
Sub