I have a "weird" script that needs to auto select and link a few layers. After its use, it cleans up all the linked layers used. It works perfectly if no layers were linked before. However, for example, if layer A is linked to layer B before the script runs, the link is gone after the script executes.
I am wondering if there is a way to capture and probably save in a table, a list with ALL linked layers (for example, layer A is linked with B, layer C is linked with D and E, etc). Then, after my script runs/clean up everything, another function is called just to set all the links again.
Ideas?
Alex
Getting/setting all linked layers in a document
-
Mike Hale
Getting/setting all linked layers in a document
A layer object has a linkedLayers property that will return an array of linked layers it the layer has any.
You could build you table using that property and looping all the layers.
You could build you table using that property and looping all the layers.