When you run this plugin, rectangles are redrawn using a pen that is 3/96 inch wide. All other objects are redrawn using a pen that is 1/96 inch wide. The UndoToHere / UndoResume method pair allows you to undo the changes by pressing .
Imports Amos
Imports Amos.pd
<System.ComponentModel.Composition.Export(GetType(IPlugin))>
Public Class CustomCode
Implements IPlugin
Public Function Mainsub() As Integer Implements IPlugin.Mainsub
Dim E As PDElement
UndoToHere()
For Each E In PDElements
If E.IsObservedVariable Then
E.Penwidth = 3
Else
E.Penwidth = 1
End If
Next
DiagramRedrawDiagram()
UndoResume()
End Function
Public Function Name() As String Implements IPlugin.Name
End Function
Public Function Description() As String Implements IPlugin.Description
End Function
End Class