Visio ShapeSheets : how know layer name and index from one shape ?

André 1 Reputation point
2021-05-05T17:39:44.233+00:00

Hello,

first scuse me, for my so bad english.

On a shape, i want affected it to a particular layer, from user choise.
To do it, wit shapesheet :

  1. I create context menu , by Actions Section
    for ex. "Archiv"
  2. on user section, I creat several lignes (attributs)
  • one to collect actual/original value of cell "Layer Membership" : "layersSaved"
  • another ("NewLayer") with name of a particular layer (ex. "Archivé")

When the user select context menu "Archiv"
i want that :

  1. save actual List of affected layer from cell "Layer Membership" to the cell "layersSaved" of user Section
  2. put the good index of the layer referenced by this name in the cell "NewLayer" of user section, in the cell "Layer Membership"

When the user deselect context menu "Archiv"
i want that :

  1. put in the cell "Layer Membership", teh value saved in cell "layersSaved" of user Section

To do this, how can i do ?

how get the index of the layer know by this name ?
this index is dependent of the entirelist of layer from the page.
My shape will be use on several pages, each with unknow list of layer.
When i put my shape on a page, automatictly, if not yet exist, the layers from the shape will add to the liste of page layers.

thank for all aids.

André

Microsoft 365 and Office | Development | Other
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.