TopicItems (Collection)

Member of:

Topic object

Description:

Represents all fields in a topic.

Tip:

All collections have the “Item(NameOrIndex)” method. This is the default method for all collections that returns collection items at a particular index or by name. Use brackets ([]) to represent calls to the Item (Method). For example, these statements are identical: myItem = Documents[1] myItem = Documents.Item(1) myItem = Documents["StartUp.bqy"] myItem = Documents.Item("StartUp.bqy")

Example:

This example shows how to print all topics names and items in a Data Model to the Console window:

with(ActiveDocument.Sections["Query"].DataModel)
{
TopicsCount = Topics.Count
for(I=1;I<= TopicsCount;I++)
{
Console.Write("\r\nTopic - "+Topics[I].DisplayName+"\r\n") 
TopicItemsCount = Topics[I].TopicItems.Count
for(j=1;j<= TopicItemsCount;j++)
Console.Write(Topics[I].TopicItems[j].DisplayName)
}
}

Methods:

Item(NameOrIndex) As TopicItem

Properties:

Read-only: Property Count As Number