Dropping and linking shapes to data
It is often necessary to drop multiple shapes and link each one of them to a different row in DataRecordset
. For example, the following screenshot shows a document with an External Data window that contains Personnel
DataRecordset
. The diagram requires the Sales team to be added to the page.

The following function, GetDataRecordset()
, looks for
DataRecordset
with the given name in the specified document and returns it:

This function is used by the following sub-function, DropManyLinked()
, filters the Personnel
DataRecordset
, gets the Person Master from the open Work Flow Objects stencil, and drops data-linked copies in a line along the bottom of the page.

The last line calls the sub-function, ApplyDataGraphics()
, shown in the following screenshot. This is a workaround for an issue that currently exists in Visio 2016. Specifically, there is a reserved User-defined Cell, named User.msvLastAppliedDataGraphic
, in DocumentSheet
that contains the name of the Data...