PDA

View Full Version : Applying Layer Settings to All Open Drawings



bweir
2008-04-28, 04:41 PM
I have a function that will change the layer colors for a drawing. What I want to do now is use this function to apply the layer settings to all my open drawings. BUT - When I iterate through the document collection I get an eLockViolation (occurs when opening the LayerTable for write) on all the documents but the active document. What needs to be done to the other drawings so I can make changes to them?

fixo
2008-05-11, 03:36 PM
Sorry for the belating
Just a guess
Try to use LockDocument:



Using doclock As DocumentLock = doc.LockDocument()
< rest code to sel layer settings goes here >
End Using

~'J'~

T.Willey
2008-05-19, 11:39 PM
I got it to work using DocumentLocking. Thanks for the heads up J.