Skip to main content
Vinícius Amaral
Known Participant
December 10, 2022
Answered

Adobe Bridge javascript create colections

  • December 10, 2022
  • 1 reply
  • 816 views

Hi there

How are you doing?

I would like to create colections from selected items, or an array of full paths.
But, I couldn´t find in the javascript guide any reference about it.
Could you show me an example or tel me when can I find a updated documentation.
The last one than I´ve founded belongs to CS3 version yet.

Thanks

This topic has been closed for replies.
Correct answer gregreser

You can find the latest SDK at https://developer.adobe.com/console/servicesandapis

 

You can create a new collection from selected thumbnails in Bridge this way:

var colItems = app.document.selections;
var colName = "New Collection";
var col = app.createCollection(colName);
app.addCollectionMember(col,colItems);
app.document.thumbnail = col;

 

Oh, by the way, there is a bug in Bridge 2023 so that the new collection does not appear in the Collections panel list unless you restart Bridge. Hopefully this will be fixed soon 🙂 

1 reply

gregreser
gregreserCorrect answer
Legend
December 10, 2022

You can find the latest SDK at https://developer.adobe.com/console/servicesandapis

 

You can create a new collection from selected thumbnails in Bridge this way:

var colItems = app.document.selections;
var colName = "New Collection";
var col = app.createCollection(colName);
app.addCollectionMember(col,colItems);
app.document.thumbnail = col;

 

Oh, by the way, there is a bug in Bridge 2023 so that the new collection does not appear in the Collections panel list unless you restart Bridge. Hopefully this will be fixed soon 🙂 

Vinícius Amaral
Known Participant
December 13, 2022

Hi Gregreser

Thanks for your answer. Thanks a lot for your help.

I think we are almost there. I need to create a colection from a list of files. All these files are in diferent folders, so, I can´t use selection.

I´ve found a solution before, whre I write a XML file and storage it in a folder inside the main folder of the Bridge, but it didn´t work for me because the I need to restart Brige to the new collection appear (the same bug that you said).
About the documentation, my firewall was blocking the adress you sent me. I will download it again.
Thans for yout hand.

gregreser
Legend
December 13, 2022

You could have a palette window, or a tabbed panel, that stays open as you navigate through different folders and alows you to add files to a list then, when you are finished, you click a button to create a new collection. Let me know if you want to collaborate on it.