Software Developer's Kit - ChemDraw

Send comments on this topic
MakeOrbital Method
See Also 
type

Description

Member of ChemDraw Control.Document.

Creates a new orbital in the document

Syntax

Visual Basic
Public Function MakeOrbital( _
   ByVal type As CDOrbitalType _
) As Graphic

Parameters

type
ValueDescription
kCDOrbitalTypes 
kCDOrbitalTypeoval 
kCDOrbitalTypelobe 
kCDOrbitalTypep 
kCDOrbitalTypehybridPlus 
kCDOrbitalTypehybridMinus 
kCDOrbitalTypedz2Plus 
kCDOrbitalTypedz2Minus 
kCDOrbitalTypedxy 
kCDOrbitalTypesShaded 
kCDOrbitalTypeovalShaded 
kCDOrbitalTypelobeShaded 
kCDOrbitalTypepShaded 
kCDOrbitalTypesFilled 
kCDOrbitalTypeovalFilled 
kCDOrbitalTypelobeFilled 
kCDOrbitalTypepFilled 
kCDOrbitalTypehybridPlusFilled 
kCDOrbitalTypehybridMinusFilled 
kCDOrbitalTypedz2PlusFilled 
kCDOrbitalTypedz2MinusFilled 
kCDOrbitalTypedxyFilled 

Return Type

Example

'Declares variables
 Dim myPointMajor As ChemDrawControl11Ctl.Point
 Dim myPointMinor As ChemDrawControl11Ctl.Point 
 Dim myDocument   As ChemDrawControl11Ctl.Document
 Private Sub cmdCommand_Click()
    'Creates an orbital 
     Dim myOrbital As ChemDrawControl11Ctl.Graphic
     Set myDocument = ChemDrawCtl1.ActiveDocument
     Set myOrbital = myDocument.MakeOrbital(kCDOrbitalTypedz2PlusFilled) 
     Set myPointMajor = myOrbital.position
     Set myPointMinor = myOrbital.position
     myPointMajor.X = 206.25
     myPointMajor.Y = 260.85 
     myPointMinor.X = 206.25
     myPointMinor.Y = 254.25
     myOrbital.MinorAxisEnd = myPointMinor
     myOrbital.MajorAxisEnd = myPointMajor
     myOrbital.selected = True
     myOrbital.visible = True
 End Sub

See Also