If you define your own join paths, use the AddTopics() method of the DefinedJoinPaths (Collection) to select a topic based on an item on the Request or Limit lines. This method corresponds to selecting an available topic on the Define Join Path dialog box and adding it to the Topics in Join Path list.
ActiveDocument.Sections["Query"]. DataModel.JoinsOptions.DefinedJoinPath[“MyJoinPath”]. AddTopic(String)
In this example, the topic Products is added to the MyJoinPath join path:
ActiveDocument.Sections["Query"].DataModel.JoinsOptions.DefinedJoinPath[“MyJoinPath”].AddTopic("Products")