Rob, your timing is spectacular, I was just today going to look for this sort of code, and voila! Coincidentally I was inspired to do so by Andre's recently posting: http://www-10.lotus.com/ldd/bpmpblog.nsf/dx/messing-around-with-design-elements?opendocument&comments#anc1
I was wondering if you have any more complete examples that would show this code being called/used in context? I've already dropped this bit in as a script library in SuperNTF, and am working on an agent management interface that will allow non-designer admin types to change agent schedules around without begging the "real" admins. I'm hoping to avoid picking apart all the custom data type stuff to figure out how to use it.