Tutorial 4 – Getting Bookmarks

Requirements:
Tutorial 3 – Adding Bookmarks


In the previous tutorial, we learned how to add a Bookmark to the BookmarkServer.

In this tutorial, we’ll learn how to retrieve the Bookmarks from the BookmarkServer. After retrieval, we’ll print out their properties.

Let’s get the list of Bookmarks:

IBookmarkServer’s method GetBookmarks returns an IBookmarkList, which represents the Bookmarks on the Server.

Next, let’s get the BookmarkList’s XML:

The XML representation of the BookmarkList is needed for BookmarkFile playback, and will be shown shortly. An example of what the BookmarkList XML is shown above.

Now, let’s print out some information about the BookmarkList:

In the above, we go through each Bookmark and print out its ID, StartTime, StopTime, time of Occurrance, Tags, as well as the Labels, and playbackURLs, from each of the Bookmark’s BookmarkFiles.

The thing to note in the above code, is how the playbackURL was retrieved:

For each BookmarkFile there will be an OcDBNetworkUrl element in the BookmarkList XML. The OcDBNetworkUrl is the playback URL and is meant to be used with AxAuga’s SetViewportSource method during playback.

Screenshot of the final program:
Series-7-Tutorial-4

That’s it. You can now retrieve some information about the Bookmarks on the BookmarkServer.


Next:
Tutorial 5 – Deleting Bookmarks