Software Developer's Kit - ChemDraw

Send comments on this topic
RemoveAttachedAtom Method
See Also 
pVal
[in] Removes this atom from the collection of attached atoms.

Description

Member of ChemDraw Control.Atom.

Removes the atom from the collection of attached atoms, for multi-center atoms and variable attachment points. 

Syntax

Visual Basic
Public Sub RemoveAttachedAtom( _
   ByVal pVal As Atom _
) 

Parameters

pVal
[in] Removes this atom from the collection of attached atoms.

Return Type

None

Remarks

Variable attachment points are the points through which we can draw different positional isomers of a compound using an abbreviated notation that retains chemical significance.

Example

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

'Removes Atom  
 Private sub cmdRemovedAttacedAtom_click()
     vMessage = MsgBox("Are you sure you want to Remove Attached Atom from selected Atom?", _
                vbQuestion + vbOKCancel, "Confirm")
     If  vMessage = 1 Then
         MyAtom.RemoveAttachedAtom 
         cmdLoad.Visible = False
     End If
     lblAttachedAtoms.Caption = "0"
 End Sub

See Also