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.
alert( app.preferences.getBooleanPreference("includeStrokeInBounds") );
You can also set a Boolean value:
app.preferences.setBooleanPreference('includeStrokeInBounds', true); // or false
Copy link to clipboard
Copied
alert( app.preferences.getBooleanPreference("includeStrokeInBounds") );
You can also set a Boolean value:
app.preferences.setBooleanPreference('includeStrokeInBounds', true); // or false
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.
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
Copy link to clipboard
Copied
@Sergey OsokinThank you for your help once again!