Software Developer's Kit - ChemDraw

Send comments on this topic
AbnormalValenceAllowed Property
See Also 

Description

Member of ChemDraw Control.Atom.

Sets and returns whether there is an abnormal valence restriction, or not, on the atom.  

Property type

Read-write property

Syntax

Visual Basic
Public Property AbnormalValenceAllowed() As Boolean

Return Type

Boolean

Remarks

The abnormal valence property specifies whether selected atoms can have a valence other than normal. This attribute, when true, indicates that valence checks should be bypassed for this atom, and that the valence should be computed from the atoms actually drawn. The definition of what valence is normal may vary from application to application, so CDX files must contain explicit information about what was drawn or computed, vs. what was inferred.

  • Not Allowed: Default. Finds compounds where the selected atoms only have valences that are normal for that element. If necessary, hydrogen atoms are automatically added to or removed from the atom before transferring it to the chemical database. If the Check Structure When Copying to Clipboard or Exporting preference is turned on, an error message warns of abnormal valences.

  • Allowed: Finds compounds with the specific valence drawn.

Example

'Declares variable vAtom
 Dim vAtom As ChemDrawControl10Ctl.Atom
'Checks that there is an atom loaded in the variable 
 If  Selection.Atoms.Count < 1 Then
     Exit Sub
 End If

 Private Sub cmdAbnormalValenceAllowed_Click()
    'Toggles the value of AbnormalValenceAllowed
     If  vAtom.AbnormalValenceAllowed = True Then
         vAtom.AbnormalValenceAllowed = False     
     Else
         vAtom.AbnormalValenceAllowed = True
     End If
 End Sub

See Also