Software Developer's Kit - ChemDraw

Send comments on this topic
MakeOrbital Method
See Also 
type

Description

Member of ChemDraw Control.Cell.

Creates a new orbital in this cell.

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 myTable As ChemDrawControl11Ctl.Table
 
Private Sub cmdCommand_Click()
    'Checks that there is a Table loaded in the variable
     If  Selection.Tables.Count < 1 Then
         Exit Sub
     End If Table
    
Set myTable = ctlChemDraw.Selection.Objects.Tables.Item(1)
     Set myCell = myTable.Cells.Item(1) 
    'creates an object within the cell 
     Dim myOrbital As ChemDrawControl11Ctl.Graphic
     
Set myOrbital = myCell.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