Software Developer's Kit - ChemDraw

Send comments on this topic
MakeEllipse Method
See Also 


Member of ChemDraw Control.Document.

Creates a new ellipse in the document


Visual Basic
Public Function MakeEllipse() As Graphic

Return Type


'Declares variables 
 Dim myDocument As ChemDrawControl11Ctl.Document 

 Private Sub cmdCommand_Click()
     Dim myEllipse As ChemDrawControl11Ctl.Graphic 
     Dim myPointMajor As ChemDrawControl11Ctl.Point
     Dim myPointMinor As ChemDrawControl11Ctl.Point
     'creates an ellipse
     Set MyEllipse =  Me.ChemDrawCtl1.ActiveDocument.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