Applies to: Nevron Diagram for .NET
How to protect the diagram library browser from adding new masters?
You can protect the library from new items being inserted with the following code:
[C#]
NAbilities protection = libraryDocument.Protection;
protection.InsertElements =
false
;
libraryDocument.Protection = protection;
[VB.NET]
Dim
protection
As
NAbilities = libraryDocument.Protection
protection.InsertElements =
False
libraryDocument.Protection = protection
This code must be executed for each library document displayed in the library browser. You can do that like this:
[C#]
foreach
(NLibraryGroup group
in
libraryBrowser.Bands)
{
NLibraryDocument libraryDocument = group.Document;
// insert protection code here
}
[VB.NET]
For
Each
group
As
NLibraryGroup
In
libraryBrowser.Bands
Dim
libraryDocument
As
NLibraryDocument = group.Document
' insert protection code here
Next
Article ID: 30, Created On: 10/5/2010, Modified: 11/15/2010