Author Topic: Reports and Layers  (Read 67 times)

0 Members and 1 Guest are viewing this topic.

jimibray

  • Jr. Member
  • **
  • Posts: 20
Reports and Layers
« on: September 17, 2020, 10:37:41 AM »
Hi,

In the Reporting functionality on Visio 2016 I know you can determine the scope of a report to look at specific layers but I'd like to have one report which includes layer name and then do some data manipulation in excel after.

I'd like to include "Layer Name" as a column in my report but it doesn't appear in the properties list - I was expecting to see it in this format <Layer Name>.

Is it possible to include layer name in a report?

Thanks,
James

jimibray

  • Jr. Member
  • **
  • Posts: 20
Re: Reports and Layers
« Reply #1 on: September 25, 2020, 08:31:14 AM »
So I've been looking into this and I can see in the shape sheet there's a field for layer membership (=LayerMember) which returns an index value and made me think I should be able use that to get the layer name - Layer.Name(LayerMember), but that didn't work.

It looks like the information around layers isn't accessible in shapesheet and would need some code, but I'm not sure how to construct this!

I think I want an IF statement saying:
IF a shape is assigned to a layer,
THEN write the layer.name to the shape property "Prop.Layer".
ELSE do nothing

Looking at the macro for writing the connection info into a property field I think my THEN element would be:
Code
shp.CellsU("Prop.Layer").FormulaU = "sheet." & shpFrom.ID & "!Layer.Name"

But I'm not sure how to write the initial if statement to even test this!

Thanks,
James

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3822
  • Ideas Visio-lized into solutions
Re: Reports and Layers
« Reply #2 on: September 25, 2020, 03:13:57 PM »
Did you search the forum???

Try this link:  http://visguy.com/vgforum/index.php?topic=8635.msg37654#msg37654  Both the 3rd and 2nd responses ought to help.
Visio 2019 Pro