Software Developer's Kit - ChemDraw

Send comments on this topic
Data Property
See Also 
dataType
A data type is an extension, a MIME type and a flag indicating whether it is valid.
resolution
Width
Indicates how many pages wide.
Height
Indicates how many pages high.

Description

Member of ChemDrawControl.Objects.

Sets and returns the data of the objects

Property type

Read-write property

Syntax

Visual Basic
Public Property Data( _
   Optional ByVal dataType As Variant, _
   Optional ByVal resolution As Variant, _
   Optional ByVal Width As Variant, _
   Optional ByVal Height As Variant _
) As Variant

Parameters

dataType
A data type is an extension, a MIME type and a flag indicating whether it is valid.
resolution
Width
Indicates how many pages wide.
Height
Indicates how many pages high.

Return Type

Example

 Dim strSMILES$
 'gets the content of the clipboard
 strSMILES= Clipboard.GetText
 strSMILES= Trim(strSMILES)
 If  strSMILES<> "" Then
     'clears the current content of the control
     ChemDrawCtl1.Objects.Clear
     
'pastes the string as structure
     ChemDrawCtl1.Data("chemical/x-smiles") = strSMILES
     'if the string was not recognized, the control is empty
     If  ChemDrawCtl1.Objects.Count = 0 Then
         'report error
         MsgBox "'" & strSMILES & "' is not recognized as a valid SMILES string.", _
         vbInformation
     End If
 End If

See Also