Software Developer's Kit - ChemDraw

Send comments on this topic
GetObjectTag Method
See Also 

Name is the name of the ObjectTag you wish to get.


Member of ChemDraw Control.TLCPlate.

Returns the ObjectTag of this TLCPlate.


Visual Basic
Public Function GetObjectTag( _
   ByVal name As String _
) As ObjectTag



Name is the name of the ObjectTag you wish to get.

Return Type


Retrieves a previously created ObjectTag for this object. Once the ObjectTag is retrieved, you can work on its properties; read them, or assign values to those that are read/write.


'Declaration of variables - object can be any ChemDraw object
 Dim vObjectTag As ChemDrawControl10Ctl.ObjectTag
 Dim myObject As ChemDrawControl10Ctl.Object
 Dim vName As String
 Private Sub cmdMake_Click()
     vName = "NewName"
     Dim vAux As String
     vAux = "Value in ObjectTag"
     Set vObjectTag = Nothing
    'creates the object tag
     MyObject.MakeObjectTag vName, vObjectTag, True
     vObjectTag.StringValue = vAux
     If  (Not vObjectTag Is Nothing) Then
         'gets the object tag but it must be visible to see
         MyObject.GetObjectTag vName
         vObjectTag.Visible = True
         Text1.Text = vObjectTag.StringValue 
         'Values can be assigned to the referenced ObjectTag  
         MyObject.GetObjectTag(vName).Color = VBRed
         MyObject.GetObjectTag(vName).Caption.Angle = 45
     End If
 End Sub

See Also