I have created a Reference layer to show debug values for a command I am writing.
I use reference layers because they are not saved with the document.
I am trying to write another command to clear these layers.
success = true;
foreach (var reference in doc.Layers.Where(l => l.IsReference).ToList()) {
success = success && doc.Layers.Purge(reference.Index, true);
}if (!success) {
Log.Warning(“Failed to clear managed Layers”);
}
However this code never succeeds - any clues why?
7 posts - 2 participants