When the path diagram of Example 4 (which includes a variable called Performance) is in the Amos Graphics window, the following plugin creates a property called Reliability associated with the Performance variable. Reliability is assigned the value ".8230". The PropertyGet method is then used to retrieve and display the value. After the property is removed with PropertyRemove, an attempt to retrieve the property with PropertyGet returns the value "Undefined".
Imports Microsoft.VisualBasic
Imports Amos
<System.ComponentModel.Composition.Export(GetType(IPlugin))>
Public Class CustomCode
Implements IPlugin
Public Function Mainsub() As Integer Implements IPlugin.Mainsub
Dim E As PDElement
E = pd.PDE("Performance")
E.PropertySave("Reliability", ".8230")
'The following statement displays ".8230"
MsgBox(E.PropertyGet("Reliability", "Undefined"))
E.PropertyRemove("Reliability")
'The following statement displays "Undefined"
MsgBox(E.PropertyGet("Reliability", "Undefined"))
End Function
Public Function Name() As String Implements IPlugin.Name
End Function
Public Function Description() As String Implements IPlugin.Description
End Function
End Class