ORD Sync All Template Drops Macro

Hi all,

Because I couldn't wait for an out-of-the-box "synchronise all templates" functionality in ORD, I have put together an mvba that crudely will synchronise all or just edited in-place Template Drops and Linear Templates. It seems to work quite well so far. Thought i'd share as it seems a shame to keep it to myself...

What it does:

  • Scans all Corridor Template Drops or Linear Templates in current model to see if they have been edited in-place (for "Edited" options - see below)
  • Gets the handle co-ordinates of each Corridor / Linear Template
  • Activates the Synchronize Template command
  • Simulates a selection of each of Corridor / Linear Template handle to initiate sync process (not supported prior to ORD 2020 Release 1)
  • Uses the freeware app "SendKeys" to close the "Are you sure" dialog with Edited Templates (I couldn't find any native mvba interaction with this)
  • Rescans model to report results of sync and if any apparently unsuccessful

MVBA Options:

  • Sync ALL Corridor Template Drops
  • Sync ALL Linear Templates
  • Sync ALL Edited Corridor Template Drops only
  • Sync ALL Edited Linear Templates only
  • Select ALL Edited Template Drops
  • Select ALL Edited Linear Templates 

In order to avoid the "Are you sure" dialog that shows when syncing a Template that has been edited, the mvba needs to locate where you put the SendKeys.exe app. The location (path inc. trailing "\") of send keys can be defined by adding a variable named "SENDKEYS_PATH" to your workspace / configuration (I have also defined other locations we use locally)

If the variable is not defined, the macro will still work, but it will pause with the dialog and wait for user input.


Happy to get some feedback if anyone finds any issues with it...