AutoComposite Object

 

An AutoComposite object contains a set of one or more objects, including other AutoComposite objects. Composite objects, also known as group objects, are created by combining several objects by using the AutoSelection Combine method or when importing some file types.

 

Derived from: AutoShape object (All methods and properties of AutoShape apply to this object.)

 

Property

Shapes

 

Method

AddObject

BreakApart

 

 

Example

This example shows how to create a composite object.

 

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")

 

 'Makes Grapher visible

  GrapherApp.Visible = True

 

 'Declares Plot as an object

  Dim Plot As Object

 

 'Creates a plot document in Grapher and assigns

 'it to the variable named "Plot"

  Set Plot = GrapherApp.Documents.Add(grfPlotDoc)

 

 'Declares Shapes as an object

  Dim Shapes As Object

 

 'Assigns the AutoShapes collection to the

 'variable named "Shapes"

  Set Shapes = Plot.Shapes

 

 'Declares Graph as an object

  Dim Graph As Object

 

 'Creates a graph and assigns it to the

 'variable named "Graph"

  Set Graph = Shapes.AddLinePlotGraph(GrapherApp.Path+"\Samples\bar chart orientations.dat")

 

 'Declares Ellipse as an object

  Dim Ellipse As Object

 

 'Create an ellipse and set it to the

 'variable named "Ellipse"

  Set Ellipse = Shapes.AddEllipse(1, 5, 9, 2)

 

 'Select both of the shapes

   Shapes.SelectAll

 

 'Declares Composite as an object

  Dim Composite As Object

 

 'Combine the objects and assigns to the

 'variable named "Composite"

  Set Composite = Plot.Selection.Combine

 

 'Reference the ellipse

  Set Ellipse_Composite = Composite.Shapes.Item("Ellipse")

 

 'Change the ellipse line color

  Ellipse_Composite.Line.Forecolor = grfColorRed

End Sub