Since, create measure is working only in ModelDoc2, i am unable to measure distance of a circular edge of a hole present in component of the assembly. Please help me.
An assembly is a ModelDoc2 interface, so you can still use the same code for edges of components. Try the following to test. There are several other measurement values that might be helpful from the IMeasure interface.
Dim swApp As SldWorks.SldWorks
Set swApp = Application.SldWorks
Dim assy As ModelDoc2
Set assy = swApp.ActiveDoc()
Dim swMeasure As Measure
Set swMeasure = assy.Extension.CreateMeasure
Debug.Print "Length = " & swMeasure.Length
Debug.Print "Perimeter = " & swMeasure.Perimeter
Debug.Print "Arc length = " & swMeasure.ArcLength
Debug.Print "Total length = " & swMeasure.TotalLength
Debug.Print "Center distance = " & swMeasure.CenterDistance
Got it Michael. Thanks for help
Retrieving data ...