Customization > Automation Interface > Functions > Functions for diagrams > IsDiagramLocked function (automation interface)
IsDiagramLocked function (automation interface)
Syntax:
IsDiagramLocked ("<id>")
Where:
<id> is a string that specifies the id of the diagram.
Returns a Boolean value to indicate whether a diagram is locked or unlocked by you. The diagram is identified through its Id.
Use the LockDiagram function to lock or unlock a diagram.
Examples
In this example, the script displays whether Class Diagram1 is locked or unlocked by you through its Id:
Set objDiagrams = ActiveProject.Item("Diagrams")
Set objDiagram = objDiagrams.Item("Class Diagram", "Class Diagram1")
strDiagram = objDiagram.Property("Id")
If Studio.IsDiagramLocked(strDiagram) = TRUE Then
Call Msgbox ("Class Daigram1 is Locked by You")Else
Call Msgbox ("Class Daigram1 is Unlocked by You")
End If