Software Developer's Kit - ChemDraw

Send comments on this topic
ID Property
See Also 

Description

Member of ChemDraw Control.ObjectTag.

Returns the ID of this ObjectTag

Property type

Read-only property

Syntax

Visual Basic
Public Property ID() As Long

Return Type

Long

Remarks

Each ChemDraw object has a unique ID, which is guaranteed to stay the same as long as the application stays open. If you save the file and open it again there is no guarantee that the ID number will stay the same.

Example

'Declares variable vObject - object can be any ChemDraw object
 Dim vObject As ChemDrawControl10Ctl.Object
'Checks that there is an object loaded in the variable
 If  Selection.Objects.Count < 1 Then
     Exit Sub
 End If

 Private Sub cmdID_click()
     Text1.text = vObject.ID
 End Sub 

See Also