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

Why doesn't symbol name come in when dragging to asset export panel?

Explorer ,
Jul 20, 2021 Jul 20, 2021

Copy link to clipboard

Copied

This seems obvious yet I can't find a batch workaround or script.

 

The current process is unnecessarily painstaking: 

1. drag symbols to asset export panel (eg. an icon library could have hundreds and multiple colour ways)

2. find symbol (one-by-one)

3. copy symbol name

4. find matching asset (one-by-one)

5. paste into asset name

6. repeat!


I can understand it must be called something like "Asset 1" if the artwork is not a symbol, but when dragging a named symbol name into asset export panel, the default surely should be match the symbol name.

 

Good news for Adobe is that they already have a solution!

 

Integrate the "Batch rename" feature from Bridge allowing "number sequencing" and the life-saving "string substitution" here like in Bridge also would make sense. 

TOPICS
Feature request , Import and export , Performance , Scripting

Views

131

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
Adobe
Community Expert ,
Jul 21, 2021 Jul 21, 2021

Copy link to clipboard

Copied

the problem is the Symbol Item's name (or lack of it), for a strange reason, the "name" you see in the Layers panel is not the Symbol Item's name, it's the actual Symbol's name. So as far as Javascript is concerned, the symbols you dragged to the artboard are NOT named. 

 

If you explicitly name your Symbol Items then you'll have no problem, the Assets would be named accordingly, but you're back to square one, naming your symbol items is the same as naming your assets.

 

try this script, select one or more symbol items in your artboard before running.

// add selected symbol items to the Assets panel and name them accordingly
// carlos canto - 07/20/2021
// https://community.adobe.com/t5/illustrator/why-doesn-t-symbol-name-come-in-when-dragging-to-asset-export-panel/td-p/12190183

function main() {
    var idoc = app.activeDocument;
    var sel = idoc.selection;
    
    var asset;
    
    for (var a=0; a<sel.length; a++) {
        asset = idoc.assets.add(sel[a]);
        if (sel[a].typename == "SymbolItem") {
            asset.assetName = sel[a].symbol.name;
        }
        else {
            if (sel[a].name != "") {
                asset.assetName = sel[a].name;
            }
        }
    }
}

main();

addSymbolsToAssetPanel.PNG

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
New Here ,
Mar 13, 2024 Mar 13, 2024

Copy link to clipboard

Copied

LATEST

It's 4AM and I was struggling with the naming of 25 symbols I created for brand logo variants of different formations and colors.

Volcanicc, Can't thank you enought for starting this thread!

Carlos! I'll find you! *inserts meme gif* and I'll kiss your hands for creating this script!!😭😭😭

I CAN SLEEP NOW!

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