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

Simple text variable to populate current Illustrator document file name on my Illustrator artboard.

New Here ,
Mar 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

I cannot find a script or a function in Illustrator that will create a text box that automatically populates with my current illustrator document file name?

This is very easily done in InDesign by going to the Type menu > Text Variables > Insert Variable > File Name. But this is not available in Illustrator for some reason. Does anyone have any suggestions?

Views

353

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 ,
Mar 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

in the future, to find the best place to post your message, use the list here, https://community.adobe.com/

p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post (like this one has already been moved) if it helps you get responses.



<"moved from cc desktop">

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
Community Expert ,
Mar 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

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 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

Thanks for sharing this @Monika Gause !

I tried copying the script from that post you referenced (see script below) but I keep getting a syntax error (see screenshot) when I try to import it into Illustrator. It’s very likely I’m doing something wrong – I have very limited experience dealing with scripts. 

Script copied from reference post:

// CODE BEGIN
var pointTextRef = app.activeDocument.textFrames.add();
pointTextRef.contents = app.activeDocument.name;
pointTextRef.top = 20;
pointTextRef.left = 10;
// CODE END 

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
Community Expert ,
Mar 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

LATEST

Do not save it in Word!

 

Save it with Editor or similar as (plain text) .txt

And then simply rename the extension from .txt to .jsx

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