Software Developer's Kit - ChemDraw

Send comments on this topic
ChemicalWarning Property
See Also 

Description

Member of ChemDraw Control.Bond.

Returns the chemical warning string for this bond, if any.

Property type

Read-only property

Syntax

Visual Basic
Public Property ChemicalWarning() As String

Return Type

String

Remarks

ChemDraw will display chemical warnings (in the form of red boxes) on atoms that have various types of unusual chemistry.  If WarningsIgnored = True no warnings will be displayed on the object. An example of a chemical warning is "too many bonds for this unlabeled carbon", when the fifth bond is drawn from the same carbon atom.

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 cmdChemicalWarning_click()
    'Read only property - returns the string for the chemical warning, if one is available
     Text1.text = vObject.ChemicalWarning
 End Sub

 Private Sub Command1_Click()
     vMessage = MsgBox("The Chemical Warning of This bond is: " & myBond.ChemicalWarning & Chr$(13) & _
          "Read Only - Property", vbInformation + vbOKOnly, "Info")
 End Sub

See Also