In plant 3D you have the option for a custom block based actuator.
But when you use a multiport valve a custom block based moves when changing the angle of the ports.
It would be nice if you can make a python script actuator.
(As far as i know and could find, this is not yet possible)