Software Developer's Kit - ChemDraw

Send comments on this topic
Tables Property
See Also 


Member of ChemDraw Control.Group. 

Returns the Tables collection of this group.

Property type

Read-only property


Visual Basic
Public Property Tables() As Tables

Return Type


The Tables property refers to the collection of Tables which is within this Group. The properties associated with the collection are the following:

myGroup.Tables.Application      returns the application associated with the Tables collection
myGroup.Tables.Count             returns the number of Tables in the collection
myGroup.Tables.Item(i)           returns one table from the collection 
myGroup.Tables.Parent            returns the parent of the Tables collection

With Group.Tables.Item(i) all the graphic properties are enabled for graphic(i). This index starts with 1.


'Returns the number of tables in this Group  
 Dim MyGroup As ChemDrawControl10Ctl.Group
 Private Sub ChemDrawControl10Ctl_SelectionChanged(ByVal selection As ChemDrawControl10Ctl.IChemDrawSelection)
     If  ChemDrawControl10Ctl.Objects.Groups.Count = 1 Then 'Checks if a Group has been drawn
         Set MyGroup = ChemDrawControl10Ctl.Objects.Groups.Item(1) 
         Text1.Text = "There are: " + format(MyGroup.Tables.Count, "##" + "tables")
         'there is no group in the document
     End If
 End Sub

See Also