Link end effector

Hi,

I'm pretty new to scripting and maxscript. For one of my first scripts I've scripted a rig with a IK HD solver, and I need to link the end of the chain to an animation dummy. Usually I do this by using the End Effector option in the motion panel, but I cannot find anything about this in the help file.

Anyone knows how to solve this?