SetLayerReadOnly

SetLayerReadOnly

Anonymous
Not applicable
278 Views
0 Replies
Message 1 of 1

SetLayerReadOnly

Anonymous
Not applicable

I have a code when I press button I set layer to readonly mode. How do I modify my code to disable readonly mode to same layer? Any suggestions?

 Using locked As DocumentLock = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument()
            Dim currentMap As AcMapMap = AcMapMap.GetCurrentMap()
            Dim laysCol As MgLayerCollection = currentMap.GetLayers()
            Dim layer As AcMapLayer
            layer = getLayerByName("testlayer")
            
            If layer.IsLayerReadOnly() = False Then
               layer.SetLayerReadOnly()

            End If
           
        End using
0 Likes
279 Views
0 Replies
Replies (0)