Class LrCollectionSet
Access the functions and properties from the object. Retrieve the objects for the top-level collection sets by calling LrCatalog.getChildCollectionSets(). To get immediate child sets, use this object's getChildCollectionsSets()
method.
You can create a new collection set object using LrCatalog.createCollectionSet(). This must be called from within one of the with__WriteAccessDo
gates. The new collection set is not available for access until that function returns.
Summary
LrCatalog
) The catalog object that contains this collection set.Functions
- collectionSet:delete()
-
Removes this collection set from the catalog.
Must be called from within one of the
catalog:with___WriteAccessDo
gates.This call can be used within the same
catalog:with___WriteAccessDo
call that created this collection.First supported in version 3.0 of the Lightroom SDK.
- collectionSet:getChildCollectionSets()
-
Retrieves the collection sets that are immediate children of this set, if any. Does not go into nested sets.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(array ofLrCollectionSet
) The collection set objects, or an empty array. - collectionSet:getChildCollections()
-
Retrieves the collections that are immediate children of this set. Does not go into nested sets.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(array ofLrCollection
) The collection objects. - collectionSet:getChildren()
-
Retrieves all immediate members of this set, both collections and collection sets.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(array ofLrCollection
andLrCollectionSet
) The collection and set objects. - collectionSet:getName()
-
Retrieves the current name of this set.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(string) The name. - collectionSet:getParent()
-
Retrieves the parent set, if any of this collection set.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(LrCollectionSet
) The parent set, or nil. - collectionSet:setName( name )
-
Sets a new name for this collection set.
Must be called from within one of the
catalog:with___WriteAccessDo
gates.This call can be used within the same
catalog:with___WriteAccessDo
call that created this collection.First supported in version 3.0 of the Lightroom SDK.
Parameters
- 1. name
- (string) The new name.
Return value
True on success, false if there is already a collection or collection set with the same name and parent. - collectionSet:setParent( parent )
-
Sets a new parent for the collection set.
Must be called from within one of the
catalog:with___WriteAccessDo
gates.This call can be used within the same
catalog:with___WriteAccessDo
call that created this collection.First supported in version 3.0 of the Lightroom SDK.
Parameters
- 1. parent
- (
LrCollectionSet
) The new parent set, or nil to make this a top-level collection set.
- collectionSet:type()
-
Reports the type of this object.
First supported in version 3.0 of the Lightroom SDK.
Return value
(string) 'LrCollectionSet'.
Properties
- collectionSet.catalog : (Read-Only)
-
(
LrCatalog
) The catalog object that contains this collection set.First supported in version 3.0 of the Lightroom SDK.
See also: LrCatalog - collectionSet.localIdentifier : (Read-Only)
-
(number) The local identifier of this collection set.
Must be called from within one of the
catalog:with___WriteAccessDo
gates, but not the same one in which the collection set object was created.First supported in version 3.0 of the Lightroom SDK.