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

Can Illustrator scripts get whether the preference "use preview bounds" is checked or not?

Contributor ,
Dec 06, 2023 Dec 06, 2023

Copy link to clipboard

Copied

I am trying to write a script but am unable to find a method to access preference settings. Does anyone know if Illustrator scripts have the ability to determine if the "use preview bounds" preference is checked or not?

 

If there is no direct method to retrieve it, are there any other ways to determine the state of the preference?

Even if there is no direct way to access the preference value through the scripting objects or methods, I'm wondering if there are any alternative approaches that could be used to programmatically check the state of the "use preview bounds" preference.

 

bounds.jpg

TOPICS
Scripting

Views

403
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

Enthusiast , Dec 06, 2023 Dec 06, 2023

 

alert( app.preferences.getBooleanPreference("includeStrokeInBounds") );

You can also set a Boolean value:

app.preferences.setBooleanPreference('includeStrokeInBounds', true); // or false

 

Votes

Translate
Adobe
Enthusiast ,
Dec 06, 2023 Dec 06, 2023

Copy link to clipboard

Copied

 

alert( app.preferences.getBooleanPreference("includeStrokeInBounds") );

You can also set a Boolean value:

app.preferences.setBooleanPreference('includeStrokeInBounds', true); // or false

 

Votes

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
Contributor ,
Dec 06, 2023 Dec 06, 2023

Copy link to clipboard

Copied

Test successful! Thank you very much, my friend. Here we are again. Your response has been very helpful to me. I want to know where I can get this kind of information.

Votes

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 ,
Dec 06, 2023 Dec 06, 2023

Copy link to clipboard

Copied

Unfortunately, you won't find any official documentation. The scripting community finds Preferences keys in files such as AIPreferenceKeys.h (Illustrator SDK) and Adobe Illustrator Prefs.

 

Thanks to @sttk3 , there is now a database of Illustrator App Prefs keys available in Notion: Illustrator Preferences > app.getIntegerPreference | Notion

Votes

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
Contributor ,
Dec 07, 2023 Dec 07, 2023

Copy link to clipboard

Copied

LATEST

@Sergey OsokinThank you for your help once again!

Votes

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