Software Developer's Kit - ChemDraw

Send comments on this topic
Width Property
See Also 

Description

Member of ChemDrawControl.Objects.

Returns the width of the rectangle bounding the objects in the collection

Property type

Read-only property

Syntax

Visual Basic
Public Property Width() As Double

Return Type

Double

Example

'returns rectangle bounding the objects collection   
 Private Sub cmdShowNumberOfObjects_Click()  
     Dim myObject1 as ChemDrawControl10Ctl.Object
     Dim myObject2 as ChemDrawControl10Ctl.Object  
     Dim myObjects as ChemDrawControl10Ctl.Objects
    'Checks if at least two Objects have been drawn
     If ctlChemDraw.Objects.Objects.Count > 2 Then 
         Set MyObject1 = ChemDrawControlCtl.Objects.Objects.Item(1)
         Set MyObject2 = ChemDrawControlCtl.Objects.Objects.Item(2)  
         Set MyObjects = ChemDrawControlCtl.Objects
        'Returns the rectangle of the objects in the collection
         Text1.text = myObjects.width 
     End If
 End Sub

See Also