Software Developer's Kit - ChemDraw

Send comments on this topic
ObjectTags Collection
See Also  Members 

Description

Member of ChemDraw Control.

For a list of all members defined for this collection, see ObjectTags Members.

ChemDraw ObjectTags Collection contains all of the ObjectTag objects in the document.  

Object Model

Remarks

ObjectTags is a collection containing all of the ObjectTags in the ChemDraw document. If myObjectTags is an ObjectTags collection object:

MyObjectTags.Application   returns the application associated with the ObjectTags collection
MyObjectTags.Count          returns the number of ObjectTags in the collection
MyObjectTags.Item(i)        given an index, references one ObjectTag in particular, enabling all the ObjectTag properties
MyObjectTags.Parent         returns the parent of the ObjectTags collection

Using myObjectTags.Item(i) all the ObjectTag properties are enabled for myObjectTags(i). This index starts with 1.

Example

'Declares and loads variable
 Dim myObjectTags As ChemDrawControl11Ctl.ObjectTags
 Set myObjectTags = ctlChemDraw.Selection.Objects.ObjectTags

 Private Sub cmdObjectTags_Click()
    'returns the application of the ObjectTags collection
     Text1.text = MyObjectTags.Application
    'returns the number of ObjectTags in the ObjectTags collection
     Text2.text = MyObjectTags.Count 
    'sets the Item(1) of the ObjectTags collection 
     myObjectTags.Item(1).ObjectTagType = 2
    'returns Item(1)of the ObjectTags collection 
     Text3.text = MyObjectTags.Item(1).ObjectTagType
 End Sub

See Also