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

Am facing this error, try to find object fill color.

Participant ,
Jun 25, 2020 Jun 25, 2020

Copy link to clipboard

Copied

"Error: Invalid value for set property 'fillColor'. Expected Swatch, String or NothingEnum enumerator, but received in indesign"

 

 

Am facing this error, try to find object fill color.
varmyColors = myDoc.colors;
var_counter = 0;
for(varl=0;l<myColors.length;l++){
if(myColors[l].name.search("DO NOT PRINT","i") >-1 || myColors[l].name.search("DO_NOT_PRINT","i") >-1 || myColors[l].name.search("DONOTPRINT","i") >-1 ){
_counter++;
if (_counter == 1) {
_DO_NOT_PRINT_Swatches.push(myColors[l].name);
_DO_NOT_PRINT_Swatches1.push(myColors[l].name);
}
else{
_DO_NOT_PRINT_Swatches.push("\t\t\t" +myColors[l].name);
_DO_NOT_PRINT_Swatches1.push(myColors[l].name);
}
}
}
for(vars=0;s<_DO_NOT_PRINT_Swatches1.length;s++){
app.findChangeObjectOptions.objectType = ObjectTypes.ALL_FRAMES_TYPE;
app.findObjectPreferences.fillColor = _DO_NOT_PRINT_Swatches1[s];
varresultObject = myDoc.findObject();
if(resultObject.length>0){
var_counter = 0;
for(varobj=0;obj<resultObject.length;obj++){
_counter++;
if(_counter == 1){
_Do_Not_Print_Object_Array.push("page "+resultObject[obj].parentPage.name+"-->"+_DO_NOT_PRINT_Swatches1[s]);
}
else{
_Do_Not_Print_Object_Array.push("\t\t\tpage "+resultObject[obj].parentPage.name+"-->"+_DO_NOT_PRINT_Swatches1[s]);
}
}
}
}
 
TOPICS
Scripting

Views

2.2K

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 10, 2023 Mar 10, 2023

Copy link to clipboard

Copied

LATEST

Hi all, I'm still seeing this bug in ID 18.2. I couldn't find the bug in uservoice, so I created one.

Please vote for it here.

- Mark

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