Software Developer's Kit - ChemDraw

Send comments on this topic
ChemicalWarning Property
See Also 


Member of ChemDraw Control.Geometry.

Returns the chemical warning of this geometry.

Property type

Read-only property


Visual Basic
Public Property ChemicalWarning() As String

Return Type



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.


'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
     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