The following Amos Graphics plugin draws double-headed arrows among the selected exogenous variables. (Use or beforehand to select the exogenous variables that you want to be correlated.)
Imports Microsoft.VisualBasic
Imports Amos
Imports AmosEngineLib.AmosEngine.TMatrixID
<System.ComponentModel.Composition.Export(GetType(IPlugin))>
Public Class CustomCode
Implements IPlugin
Public Function Mainsub() As Integer Implements IPlugin.Mainsub
Dim SelectedEx As New Collection
Dim x As PDElement
Dim i As Integer
Dim j As Integer
'Construct the collection of selected, exogenous variables
For Each x In pd.PDElements
If x.IsSelected And x.IsExogenousVariable Then
SelectedEx.Add(x)
End If
Next
'Draw the double-headed arrows
For i = 1 To SelectedEx.Count
For j = i + 1 To SelectedEx.Count
x = pd.DiagramDrawCovariance(SelectedEx(i), SelectedEx(j))
x.IsSelected = True
Next
Next
'Try to improve the appearance of the path diagram
If SelectedEx.Count > 0 Then
pd.EditTouchUp(SelectedEx(1))
pd.EditTouchUp(SelectedEx(1))
End If
'The user will probably want to modify the curvature of the new
'double-headed arrows.
pd.EditShapeOfObject()
End Function
Public Function Name() As String Implements IPlugin.Name
End Function
Public Function Description() As String Implements IPlugin.Description
End Function
End Class