Skip to main content
Participating Frequently
February 6, 2013
Question

Auto update files that have "different layers than the imported version" ?

  • February 6, 2013
  • 2 replies
  • 5862 views

Hello all,

Is there a way to auto update all links that have modified layer options?

I have a lot of illustrator files which have a lot of layers in them, I import each file into indesign and use "object layer options" to toggle layers on/off.

I then duplicate the object in indesign and change the object layer options to toggle a new layer on.

When I'm done, on average I will have about 100 linked file which will be used 5 times with differernt layers toggled on.

Updating modified links is not a hassle but if I add, rename, remove, or change the layer order of the orginal file, I get the following error when updating:

"The file xxxx has different layers than the imported version. The link will be updated with the source file's current layer visibiltiy setttings."

I have to keep clicking ok for each time I used the same file with a different layer showing is time consuming.

Is there a way of updating my indesign file without having to hit "ok" for each link when the modified linked file has different layers?

I am on a Mac and any help would be greatly appericated.

Thank you all.

This topic has been closed for replies.

2 replies

ursuss
Participant
September 25, 2014

Well, I use a simple and somewhat childish solution: I keep the Enter key pressed until it imports all the files It works like wonder.

Jump_Over
Legend
February 6, 2013

Hi,

All you wrote you do - it means - script does?

(since you are on scripting forum)

If yes try to toggle between:

app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;

app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;

rgds

uDesignAuthor
Participating Frequently
February 6, 2013

Hey, thanks for the reply!

Sorry, I should have been more clear and I apologize ahead of time if I posted to the wrong section.

I do not have a script for any of the above.

I actually do not know anything about scripting and it intimidates me

Currently, I am doing everything manually.

Adding files and toggling layers on and off is fine and needs to be done manually.

Each Illustrator files = to a styles

Each style has multiple colors (some styles have 2 colors other may have 30+)

Each color is on its own layer (each layer is named the colors name)

Other people have access to the illustrator files.

They add, delete, rename layers.

When we goto update our indesign files, we get the above error and need to manually click "ok" to each change.

Once inside indesign, any file we clicked "ok" on will need to have its object layer options fixed because indesign turned all layers on again.

This ends up being a lot of clicks just to get into the file so we can fix the layer options again.

I was looking for help / a script / a plugin / advice / solution to the above problem.

I would love it if indesign remembered which layer I had toggled on, regardless of layer order or number of layers but I don't think this is possible?

Thanks again!

Jump_Over
Legend
February 7, 2013

Awesome, label for grouped object now works with above code.

  

Users are able to do the following to Illustrator files:

  

  • Make new layer(s)
  • Rename old layer(s)
  • Re-arrange layer order
  • Delete layer(s)
  • Not sure if it's relevant but some files also contain "template" layers which are used for revision notes.
  • (if you double click a layer in illustrator, you can change to template which keeps it from being printed or showing in indesign)

Each time one of the above is done, object layer options reverts back to toggling all layers on and we have to manually click okay for each time the changed object is used.

In a file that has 500+ links, this can be a lot of clicks.

Thanks again!


Hi,

Check this for the 2nd step:

myDoc = app.activeDocument;

myObj = myDoc.allGraphics;

var arr = new Array(), currLayers, check;

app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;

for (var k = 0; k < myObj.length; k++) {

    if (myObj.itemLink.name.match(/\.ai$/) ) {

    myObj.itemLink.update();

    myRefresh (k);   

    arr = myObj.parent.label.split(",");

    o: for (var j = 0; j < currLayers.length; j++) {

        for (var i = 0; i < arr.length; i++)            

            if(currLayers.name == arr) {

//               currLayers.currentVisibility = true;    // this could be switched off

//               myRefresh (k);     // this could be switched off

                continue o;

            }

                currLayers.currentVisibility = false;

                myRefresh (k); 

    }

    }

}

app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;

function myRefresh (number) {

    myObj = myDoc.allGraphics;

    currLayers = myObj[number].graphicLayerOptions.graphicLayers;

    }

If some layer was renamed ==> can't see the way to update it this way.

You have to relink it manually, I am afraid.

enjoy