• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

[SCRIPT] Get Stacks from Thumbnails

Enthusiast ,
Nov 15, 2024 Nov 15, 2024

Copy link to clipboard

Copied

Can anybody help? I need to get stacks from thumbnails in Bridge.

I have lots of images, some stacked, and I can't find a way, in scripting DOM, to know if that thumbnail is part of a stack. I can get the files if I loop thru app.document.stacks. But I can't get the stacks from the thumbnails. Is it even possible?

TOPICS
Scripting

Views

40

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Nov 21, 2024 Nov 21, 2024

Hello,

 

Thanks for reaching out. 

There is a method that can help "getStackForThumbnail()". 

This is the sample usage:

  //If a thumbanil belongs to a stack, we can get the stack object using getStackforThumbnail()
  var visibleThumbanils = app.document.visibleThumbnails;
  if (visibleThumbanils.length > 0)
  {
    var thumbnailObj = visibleThumbanils[0];
    
    // Call getStackForThumbnail to get the stack object containing this object
    var stackObject = app.document.getStackForThumbnail(
...

Votes

Translate

Translate
Adobe Employee ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

Hello,

 

Thanks for reaching out. 

There is a method that can help "getStackForThumbnail()". 

This is the sample usage:

  //If a thumbanil belongs to a stack, we can get the stack object using getStackforThumbnail()
  var visibleThumbanils = app.document.visibleThumbnails;
  if (visibleThumbanils.length > 0)
  {
    var thumbnailObj = visibleThumbanils[0];
    
    // Call getStackForThumbnail to get the stack object containing this object
    var stackObject = app.document.getStackForThumbnail(thumbnailObj);
    if( stackObject )
    {
       $.writeln("This thumbnail is part of this stack object");
    }
    else
    {
        $.writeln("This thumbnail is not part of any stack object");
    }
  }

 This code is part of the Developer SDK samples, particularly file "SnpManageStacks.jsx"

 

Regards,

Deepak

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

LATEST

Thank you so much.

This is not in the any documentation I have access.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines