These are some NX scripts I wrote. They're not as robust as they should be, but they get the job done for what I need.