Software Developer's Kit - ChemDraw

Send comments on this topic
PositioningType Property
See Also 

Description

Member of ChemDraw Control.ObjectTag.

Sets and returns the type of positioning for the ObjectTag.

Property type

Read-write property

Syntax

Visual Basic
Public Property PositioningType() As CDPositioningType

Return Type

Remarks

This is an enumerated property which indicates the type of positioning for the ObjectTag.

Example

'Shows example of PositioningType property
 Dim myObjectTag as ChemDrawControl10Ctl.ObjectTag
 Dim myObject as ChemDrawControl10Ctl.Object
 Dim vName as string

 Private Sub Load_ObjectTag_Click()
    If  myObjectTag is Nothing Then
        vMessage = MsgBox(“No ObjectTag is loaded”, vbCritical + vbOKOnly, “Error”)
        vName = “Name_of_ObjectTag”
        ‘Makes an ObjectTag
        myObject.MakeObjectTag vName, myObjectTag, True
        ‘ObjectTag must be visible
        myObjectTag.Visible = True
        ‘Assigns the content of vString to the ObjectTag.StringValue 
        myObjectTag.StringValue = vString
        ‘With Persistent = False the ObjectTag will be saved when the file is saved
        myObjectTag.Persistent = False
        ‘Positions Tag by CDPositioningType 
        myObjectTag.PositioningType = kCDPositioningTypeAuto  ' value 0
        'myObjectTag.PositioningType = kCDPositioningTypeAngle 'value 1
        'myObjectTag.PositioningType = kCDPositioningTypeOffset 'value 2 
        'myObjectTag.PositioningType = kCDPositioningTypeAbsolute 'value 3 
    End If
End Sub

See Also