Author Topic: Count all line lenghts from layer  (Read 1239 times)

0 Members and 1 Guest are viewing this topic.


  • Newbie
  • *
  • Posts: 8
Count all line lenghts from layer
« on: March 31, 2015, 01:51:20 PM »

I've draw a map of a factory with all the ways product flow throw the factory. There are five different flows and I’ve put them in different layers. Now I want to make a data graphics with the information in it what distance every different flow travels.  Can anyone help me with the custom formula I need to make. It needs to make count all the lengths from the lines from one separate layer. 

Gr Henri


  • Full Member
  • ***
  • Posts: 205
Re: Count all line lenghts from layer
« Reply #1 on: March 31, 2015, 08:00:35 PM »

I am thinking that if you make the desired line layer visible on the active page then.

from Yacines recent post, the following routine may be helpful :

Sub test()
ActiveWindow.SelectAll 'this will select only the visible lines
For Each shp In ActiveWindow.Selection 'iterate through the lines
Debug.Print shp.Name
Next shp
Debug.Print "____"
For Each shp In ActivePage.Shapes
Debug.Print shp.Name 'here you need to target the attribute that yields the line length
Next shp
End Sub

Is the line length in a shape sheet custom cell or a shape data cell ?
or is the line length a x,y co-ordinates begin X ,begin Y end X, end Y