DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Property: Count for PropertyList <Data>

Property: Count for PropertyList <Data>

Specifies the number of properties which you dragged and dropped onto another object. These properties might be DIAdem base properties or custom properties of the channels, the channel groups, or the root.

Object.Count
ObjectPropertyList <Data>
Object with this property
Object.CountLongInteger with read access
Note  To test the example script, you must first save the script and register the script as a user command in the dialog box that opens when you select Settings»Extensions»User Commands.

The example executes the user command MyOnDropPageEvent when dragging groups, channels, or properties onto a worksheet. The user command displays the names of the elements that you dragged onto an object. After you have dragged the properties onto an object, the user command displays the names and the display names of the properties. The dummy commands for CodeCompletion depend on which type the elements and properties are that you drag onto an object:

Report.Events.OnDropPage = "MyOnDropPageEvent"

Sub MyOnDropPageEvent(Context, DropContext)
  Dim sOutput, oMyDropElements, oMyDropElement, oMyDropProperties, oMyDropProperty 
  If DropContext.IsKindOf(eDropDIAdemElement) Then
    If False Then Set oMyDropElements = Data.Root.ActiveChannelGroup.Channels(1) 'This is a dummy statement for autocompletion
    Set oMyDropElements = DropContext.DiademElements
    sOutput = oMyDropElements.Count & " dropped elements:"
    For Each oMyDropElement in oMyDropElements
      sOutput = sOutput & VBCrLf & "Name: " & oMyDropElement.Name 
    Next
  ElseIf  DropContext.IsKindOf(eDropDIAdemProperty) Then 
    If False Then Set oMyDropProperties = Data.Root.ChannelGroups(1).Channels(1).Properties  'This is a dummy statement for autocompletion
    Set oMyDropProperties = DropContext.DiademProperties
    sOutput = oMyDropProperties.Count & " dropped properties:"
    For Each oMyDropProperty in oMyDropProperties
      sOutput = sOutput & VBCrLf & "Name: " & oMyDropProperty.Name & VBTab & "DisplayName: " & oMyDropProperty.DisplayName
    Next
  End If
  Call Msgbox(sOutput)
  Context.DoProceed = False
End Sub
In This Section
Was this information helpful?