Software Developer's Kit - ChemDraw

Send comments on this topic
MakeObjectTag Method
See Also 
name

Name is an arbitrary label by which the ObjectTag may be identified

newTag

newTag is the ObjectTag that will be created i.e. the ObjectTag

duplicatesAllowed

indicates whether duplicate values are allowed, or not

Description

Member of ChemDraw Control.AltGroup.

Adds a specified object tag to this AltGroup.

Syntax

Visual Basic
Public Sub MakeObjectTag( _
   ByVal name As String, _
   ByVal newTag As ObjectTag, _
   ByVal duplicatesAllowed As Boolean _
) 

Parameters

name

Name is an arbitrary label by which the ObjectTag may be identified

newTag

newTag is the ObjectTag that will be created i.e. the ObjectTag

duplicatesAllowed

indicates whether duplicate values are allowed, or not

Return Type

None

Remarks

Creates a new ObjectTag for this object. Duplicate ObjectTags may be allowed, or not, using "duplicates allowed".

Example

'Example - ObjectTag - 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 of 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 'returns the content of vAux
         vMessage = InputBox("Input ObjectTag text", "Input", vName)
         MyObject.MakeObjectTag vName, vObjectTag, True
         vObjectTag.StringValue = vMessage
     End If
 End Sub

See Also