Greetings and Salutations;
I'm in the process of learning the API and have an interesting question to ask.
A 5 point spline is created with the API. See images below showing the spline and the immediate window output from the creation of the spline.
A different routine is used to extract the spline points but only 3 points are extracted. See image below showing only 3 points returned instead of the 5 points that created the spline.
Attached are the macro files macro7.swp and ExtractSplinePoints.swp. Macro7 creates the spline and function GetSplinePts1 in ExtractSplinePoints returns the points from the selected spline.
Just FYI...I did not write the original code but only added code to print to the immediate window and to a file in c:\temp. All of the code was found in the SW API Help.
If the spline is selected in SW, there are 5 points on the spline.
Any idea why the number of points returned by the API is not equal to the number of points in the spline shown in SW??
Thanks in advance!
Extracting spline data using API
Extracting spline data using API
- Attachments
-
- ExtractSplinePoints.swp
- (66.5 KiB) Downloaded 60 times
-
- Macro7.swp
- (34 KiB) Downloaded 59 times
Re: Extracting spline data using API
Update: I was able to find example code in the API Help that found all of the spline points. The example code is found under the GetSketchSegments Method (ISketch).