Setting global diagram variables locally

By Martin Seibert

July 26, 2016

Categories: feature

draw.io 5.5.4.0 adds a special field called “placeholder” in the metadata of cells. Setting “placeholder” as the key inserts the associated value as a global key with the cell label as the value. Take a look at this example diagram (click on it to open in draw.io):

Example metadata draw.io diagram

Example metadata draw.io diagram

The upper and lower “John Doe” labels are defining a global variable called “author”. Editing either label will change the other, since they share the same placeholder value. Selecting a cell and pressing ctrl+M opens the metadata dialog.

The paragraph starting “This diagram was…” is referencing the placeholder fields in the uppermost cell. Changing the labels in the top cell changes the cell below that references it, but not vice versa.

Previously, variables and referencing variables was more focused on group hierarchies of cells, this mechanism allows more flexibility.

Last Updated on August 9, 2024 by Admin

Nothing Found

Last Updated on August 9, 2024 by Admin