Software Developer's Kit - ChemDraw

Send comments on this topic
Objects Property
See Also 

Description

Member of ChemDraw Control.selection

Returns the objects that are selected

Property type

Read-only property

Syntax

Visual Basic
Public Property Objects() As Objects

Return Type

Remarks

Returns the objects in the selection.

Example

'Uses Selection.Objects
 Private Sub ctlChemDraw_SelectionChanged(ByVal selection As ChemDrawControl10Ctl.IChemDrawSelection)
     Set MyGroup = ctlChemDraw.MakeGroup()
     For  x = 1 To Selection.Objects.Count - 1 'groups object, without grouping the group
          Selection.Objects.Item(x).Group = MyGroup
     Next x
 End Sub

'Declares variables and assigns the selected objects to a variable
 Dim myTable As ChemDrawControl11Ctl.Table
 Dim myCell As ChemDrawControl11Ctl.Cell
 Set myTable = ChemDrawCtl.selection.Tables.Item(1)
 Set myCell = ChemDrawCtl.selection.Tables.Item(1).Cells.Item(1)

See Also