A possible alternative to using MapGuide API programming code to make the changes, it might be worth investigating the built in Python-based scripting that comes built into Maestro. I've never used it myself and don't know much about it, but from the looks of it using Python might also do the job.