Message 1 of 1
SetLayerReadOnly

Not applicable
11-14-2018
02:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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