Visio shape (Gantt Bar) not updating with automation

Viewed 27

I'm trying to automate the updating of some GANTT bars with a button setting the beginning date at 2w before now and ending date at 10w after now. Problem is that it actually work and changes the data for the shape but doesn't update the visual. When I right click on the shape, open the parameters modification, select then unselect any parameter and validate, it actually update the visual, without any modification. Do someone have an idea why this happen ? I haven't found anywhere the same problem on internet except on a topic 19 yo with no response.

I'm using

Application.ActiveWindow.Page.Shape.ItemFromID(myID).CellsSRC(visSectionUser, 1, visUserValue).FormulaU = "NOW() -14ed"

Application.ActiveWindow.Page.Shape.ItemFromID(myID).CellsSRC(visSectionUser, 2, visUserValue).FormulaU = "NOW() + 10ew"

also tried with FormulaForce.

Thanks for any help

1 Answers

Gantt chart diagrams are controlled by an addin that is built-in to Visio. This addin controls most aspects of the diagram and Microsoft don't publish details of its internals. Looking at the Actions cells you can see that the Edit Date command performs action: RUNADDONWARGS("GC","/CMD=2610") This might do all kinds of things internally. Good luck.

Related