Automating the Timeline Shapes: Part 2

My good buddy Bill (no, not G) ran into an oddity when trying to automate the timeline shape. After you drop a timeline master to the page and set the begin-and-end dates, the time scale markers do not get updated. The labels for the begin-and-end dates are updated correctly. When you drop a milestone marker and set its date, the timeline even positions it correctly. There just seems to be something different with the time scale markers. If you right-click on the timeline, click “Configure Timeline…”, and click OK, the time scale markers magically get refreshed.

So how do you do this in code? Never fear, it’s possible. I should have put this in the last entry, but it didn’t cross my mind. Thanks, Bill. All you have to do is call the Timeline solution’s add-on, ts.

If you inspect the Action row that corresponds with Timeline shape, you’ll notice the following formula in Action cell: RUNADDONWARGS(“ts”, “/cmd=3”). This is what brings up the Configure Timeline dialog. If you call this add-on in code while AlertResponse is turned on, the dialog won’t appear, but rather it will refresh the time scale markers. To call the add-on in code, use the Run method of the Addon object that corresponds with the “ts” add-on.