How to set diagram read only?


Author
Message
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
You have several options:

1.  Loop all elements and set the respective protections
2. Disable the respective tools  - for example the following code disables the Move tool:

NTool tool = drawingView.Controller.Tools.GetToolByName(NDWFR.ToolMove);
tool.Enabled = false;

3. One dirty trick to disable modifcations is to set an invalid id to the ActiveLayerUniqueId property:
m_View.document.ActiveLayerUniqueId = Guid.NewGuid()

Tools that modify the document always take the active layer into account. If you do not have an active layer, user cannot modify or select anything.






Best Regards,
Nevron Support Team


Boon Kean Chin
Boon Kean Chin
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)
Group: Forum Members
Posts: 3, Visits: 14
How to set diagram read only, not allowing user to make any changes to the document? Have to loop all the elements in the diagram?
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search