3 Replies Latest reply on Jan 25, 2011 9:51 PM by areohbee

    catalog:setActiveSources( sources )

    areohbee Level 5
      The API doc says: "Do not mix collections with folders".

      It also says: "This is  the equivalent of selecting items on the leftmost panel in the Library  module"

      I regularly select both collections and folders in the leftmost panel... Hmmm... I wonder what's the rub?

      R




      Excerpt from API doc:

      catalog:setActiveSources( sources )
      Sets the sources from which the grid photos are currently drawn. This is  the equivalent of selecting items on the leftmost panel in the Library  module. The active sources can be a set of collections and collection  sets, or a set of folders.

      First supported in version 3.0 of the Lightroom SDK.

      Parameters

      1. sources
      (string or array) Can be an array of objects, or a string that identifies a predefined set of photos.
      • If an array, it can contain any mix of LrCollection, LrCollectionSet, LrPublishedCollection and LrPublishedCollectionSet, or it can contain one or more LrFolder objects. Do not mix collections with folders.
      • If a string, it must be one of the string constants defined in these LrCatalog properties:
        • kAllPhotos
        • kQuickCollectionIdentifier
        • kPreviousImport
        • kTemporaryImages
        • kLastCatalogExport
        • kTargetCollection

      Return value

      True on success, false if the sources are not correctly specified.