I need to split a cam profile into points evenly spaced at 1 deg increment for 360 degrees. I know we can use reference points to split a curve based off of distance, percentage or even distribution but, is there any way to split a curve based on angle? Drawing a line, patterning it with 360 instances over 360 deg and manually placing a point at each intersection is insanely tedious.

Hi,

Quick and dirty.

Open the part file then open excel blank spread sheet. Copy code into solidwork vba module and run it.

You need to check Microsoft Excel X.X object library for it run.

Cylinder coordinates output as per image below. First row is angle, second row is radius dimension in inches of cam ref point.

X & Y coordinates can be calculated in excel if you want to.

Dim swApp As SldWorks.SldWorks

Dim swModel As SldWorks.ModelDoc2

Dim swDim, ADim As SldWorks.Dimension

Dim vDimVal, aDimVal As Variant

Const PI As Double = 3.14159265358979

Dim xlApp As Excel.Application

Dim xlWorksheet As Excel.Worksheet

Sub main()

Set swApp = Application.SldWorks

Set swModel = swApp.ActiveDoc

Dim varr() As Variant

ReDim Preserve varr(1 To 359)

Set swDim = swModel.Parameter("d@Fit Spline")

Set ADim = swModel.Parameter("d3@Fit Spline")

Set xlApp = GetObject(, "excel.application")

Set xlWorksheet = xlApp.ActiveSheet

For i = 1 To 359

ADim.SystemValue = i / 180 * PI

aDimVal = ADim.GetSystemValue3(swThisConfiguration, Empty)

swDim.SetSystemValue3 aDimVal(0), swThisConfiguration, Empty

Debug.Print aDimVal(0) / PI * 180

swModel.EditRebuild3

vDimVal = swDim.GetSystemValue3(swThisConfiguration, Empty)

swDim.SetSystemValue3 vDimVal(0) * 25.4 / 1000, swThisConfiguration, Empty

varr(i) = vDimVal(0) * 1000 / 25.4

'Debug.Print vDimVal(0) * 1000 / 25.4

Debug.Print varr(i)

xlWorksheet.Cells(i, 1) = i

xlWorksheet.Cells(i, 2) = varr(i)

' Stop

Next

End Sub