Profile Picture

How to set diagram read only?

Posted By Boon Kean Chin 10 Years Ago
Author
Message
Boon Kean Chin
Question Posted 10 Years Ago
View Quick Profile
Forum Newbie

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
Last Active: 10 Years Ago
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?

Nevron Support
This post has been flagged as an answer
Posted 10 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
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





Similar Topics


Reading This Topic