I've been trying to get the LoadSplineData() to work and have had no sucess at all. I've wasted 8+hrs trying to figure this out...
all I want to freaking do is just update the Motor data via a text file with the same name!!!! I don't understand why this is so difficult!!! The online tutorial and documentation is uesless!
Everything works except for the "LoadSplineData("C:\....csv") command
I keep getting a run-time error '-2147417851 (80010105)':
Automation error
The server threw an exception.
Below is an excerpt from my code:
vMotionFeatures = swMotionStudy3.GetMotionFeatures
Dim strMotor As String
For i = 0 To UBound(vMotionFeatures)
Set swFeat = vMotionFeatures(i)
If swFeat.GetTypeName = "AEMLinearMotor" Then
For n = 0 To 3
strMotor = "LinearMotor5" & n
If swFeat.Name = strMotor Then
'do thing here
Set swMotorFeat = vMotionFeatures(i).GetDefinition
retval = swMotorFeat.LoadSplineData("C:\Motor5" & i & ".csv")
End If
Next n
n = 0
End If
Next i
Please!!! Any help would be much appreciated!
Thanks,
-Jp-
SolidworksApi macros