Represents all fields in a topic.
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") |
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) } }