First of all, I'm not Randy Maybery. 🤔
And yes, it is very easy to allow you to select the two parts lists, but I was thinking you wanted to avoid as much manual interaction as possible with this automation project.
Here is the updated code, that allows you to select them. It says right in the selection comments which is which.
Dim oDDoc As DrawingDocument = ThisDrawing.Document
Dim oSheet As Sheet = oDDoc.ActiveSheet
Dim oPList1 As PartsList = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingPartsListFilter, "Select the Parts List that will stay in place.")
Dim oPList2 As PartsList = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingPartsListFilter, "Select the Parts List that you want to move.")
'Also assumes you want the right sides of both to line up
'and that you want the top of the first and the bottomof the second to line up
'Get top right corner of oPList1
Dim oP1X As Double = oPList1.RangeBox.MaxPoint.X
Dim oP1Y As Double = oPList1.RangeBox.MaxPoint.Y
'Get bottom right corner of oPList2
Dim oP2X As Double = oPList2.RangeBox.MaxPoint.X
Dim oP2Y As Double = oPList2.RangeBox.MinPoint.Y
'Get differences between those two locations
Dim oXDiff As Double = oP1X - oP2X
Dim oYDiff As Double = oP1Y - oP2Y
Dim oP2Pos As Point2d = oPList2.Position
Dim oNewX As Double
If oXDiff < 0 Then 'oPList2 needs to move to the left
oNewX = oP2Pos.X - Abs(oXDiff)
ElseIf oXDiff = 0 Then 'they are already aligned along the right side
oNewX = oP2Pos.X
ElseIf oXDiff > 0 Then 'oPList2 needs to move to the right
oNewX = oP2Pos.X + Abs(oXDiff)
End If
Dim oNewY As Double
If oYDiff < 0 Then 'oPList2 needs to move down
oNewY = oP2Pos.Y - Abs(oYDiff)
ElseIf oYDiff = 0 Then 'they are already aligned top to bottom
oNewY = oP2Pos.Y
ElseIf oYDiff > 0 Then 'oPList2 needs to move up
oNewY = oP2Pos.Y + Abs(oYDiff)
End If
'Since I don't know where on the parts lists your origin positions will be...
Dim oNewPosition As Point2d = ThisApplication.TransientGeometry.CreatePoint2d(oNewX,oNewY)
oPList2.Position = oNewPosition
Wesley Crihfield

(Not an Autodesk Employee)