OK, I lied. Actually I had just never looked into this, so I thought it would be harder. But it's not.
Sub change_pin()
Dim pstack As MGCPCB.Padstack
Dim pstack_name AsString
Dim pin As MGCPCB.Pin
Dim pins As MGCPCB.Pins
pstack_name = "p:ex70y70d38a"
pstack = doc.PutPadstack(1, 1, pstack_name, False, False)
pins = doc.Pins(1)
ForEach pin In pins
If doc.TransactionStart(0) Then
pin.CurrentPadstack = pstack
doc.TransactionEnd(True)
EndIf
Next
EndSub
The above works. pin.CurrentPadstack is the key command. Of course you could do it differently, by feeding it the pin to change, the new padstack name, etc., as needed by what you are trying to do. I used it to change an SMT pin to a through hole pin and it didn't complain. The transaction mode 0 I used means no DRC, so use it with caution.