Software Developer's Kit - ChemDraw

Send comments on this topic
MakeEllipse Method
See Also 

Description

Member of ChemDraw Control.Cell.

Creates a new ellipse in this cell

Syntax

Visual Basic
Public Function MakeEllipse() As Graphic

Return Type

Example

'Declares variables
 Dim myTable As ChemDrawControl11Ctl.Table
 Set myCell = ctlChemDraw.Selection.Objects.Cell

 Private Sub cmdCommand_Click()
    'Checks that there is a Table loaded in the variable
     If  Selection.Tables.Count < 1 Then
         Exit Sub
     End If
     Set myCell = myTable.Cells.Item(1) 
     Dim myEllipse As ChemDrawControl11Ctl.Graphic 
     Dim myPointMajor As ChemDrawControl11Ctl.Point
     Dim myPointMinor As ChemDrawControl11Ctl.Point
    'creates an object within the cell variable
     
Set MyEllipse = myCell.MakeEllipse
     Set MyPointMajor = myEllipse.Position 
     Set MyPointMinor = myEllipse.Position 
     Set MyPointMajor.X = 190.5 
     Set MyPointMajor.Y = 201.5 
     Set MyPointMinor.X = 157.5 
     Set MyPointMinor.Y = 234.5 
     MyEllipse.MajorAxisEnd = MyPointMajor 
     MyEllipse.MinorAxisEnd = MyPointMinor

   
  MyEllipse.selected = True  
     MyEllipse.IsBold = True 
     MyEllipse.IsDashed = False

     MyEllipse.IsFilled = True 
     ctlChemDraw.ActiveDocument.Zoom (2000)
 End Sub

See Also