how to measure the total routing length through API in solidworks 2014

Hi all,

Precondition

Selecting the routing assembly in top level assembly

Postcondition

To measure the total length of all routesegment.

Option Explicit

Dim swApp As SldWorks.SldWorks

Dim swmodel As SldWorks.ModelDoc2

Dim swsel As SldWorks.SelectionMgr

Dim swcomp As SldWorks.Component2

Dim swassy As SldWorks.AssemblyDoc

Dim rtRouteManager As SWRoutingLib.RouteManager

Dim rtRouteProperty As SWRoutingLib.ElectricalRouteProperty

Dim sketch As SldWorks.sketch

Dim skSegments As Variant

Dim skSegment As SldWorks.SketchSegment

Dim i As Integer

Sub main()

Set swApp = Application.SldWorks

Set swmodel = swApp.ActiveDoc

Set swsel = swmodel.SelectionManager

Set swcomp = swsel.GetSelectedObject6(1, -1)

Set swassy = swcomp.GetModelDoc2

Set rtRouteManager = swassy.GetRouteManager

rtRouteManager.Editroute

End Sub

I have tried upto somelevel but I could not move further,please help me to resolve this.

Thanks in advance

Manikandan.B

SolidworksApi macros