Have you registered the "redraw_diagram(1)" function as a user command?
Try putting this function into a separate file and registering it as a user command:
From DIAdem-AUTO please go the the menu bar and choose: "Settings" - "Desktop Parameters" - "User commands" and add the file containing the 'redraw_diagram" function here.
These user commands will always be loaded when DIAdem is started, so you won't have to load it every time you want to use the MenuItemInsert command.
Please let me know if this helps. If not, we'll have to try a different solution,
Otmar
Otmar D. Foehner