Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

NX VB Journal - Creating Spline using PtSlopeCrvatr Container 1

Status
Not open for further replies.

jmarkus

Mechanical
Jul 11, 2001
377
Hi,

This is related to the askfacedata/askfaceprops code I am working on but it is a separate question - so I figured I post it on its own.

I am trying to create a spline ultimately using CreateSplineThruPts but first I need to populate the PtSlopeCrvatr with data. I have declared my variable as:

Code:
dim PTDATA() as NXOpen.UF.UFCurve.PtSlopeCrvatr = New NXOpen.UF.UFCurve.PtSlopeCrvatr() {}

But I still get "Object reference is not set to instance of object" as soon as I try to assign as follows:

Code:
for p as integer = 0 to totalpoints
PTDATA(p).point(0)=ptx
...etc...

How do I initialize the variable properly to be able to put data into it?

Thanks,
Jeff
 
Replies continue below

Recommended for you

If you don't know the size of the array you will need at the time of initialization, don't use the New constructor. Just dimension an empty array and ReDim it later when the needed size is known.

Code:
[COLOR=blue]Dim[/color] ptx(2) [COLOR=blue]As[/color] [COLOR=blue]Double[/color]  
[COLOR=blue]Dim[/color] total [COLOR=blue]As[/color] [COLOR=blue]Integer[/color]  

total [COLOR=blue]=[/color] 3  

ptx(0) [COLOR=blue]=[/color] 0  
ptx(1) [COLOR=blue]=[/color] 1  
ptx(2) [COLOR=blue]=[/color] 2  

[COLOR=blue]Dim[/color] PTDATA() [COLOR=blue]as[/color] NXOpen.UF.UFCurve.PtSlopeCrvatr  
[COLOR=blue]ReDim[/color] PTDATA(total)  

[COLOR=blue]For[/color] p [COLOR=blue]As[/color] [COLOR=blue]Integer[/color] [COLOR=blue]=[/color] 0 [COLOR=blue]to[/color] total  
  PTDATA(p).point [COLOR=blue]=[/color] ptx  
[COLOR=blue]Next[/color]

 
I tried that too, even with the construction you suggest (No "New" and a redim later on) and I still get the same error. I think for some reason NX doesn't "like" me referring to the PtSlopeCrvatr item while it is empty - which doesn't make sense to me because it needs to be empty so I can fill it :)

Jeff
 
I tested the code posted above and got no errors.

Which line of your code reports an error, and what does that line look like?

Also, note the difference above
Code:
PTDATA(p).point[COLOR=red][s](0)[/s][/color]=ptx

 
That difference was the difference (and the line with point(0) was where the error was reported). Now I know I can't call out the points individually. That works!

Thanks,
Jeff
 
Here's a quick example:

Code:
[COLOR=blue]Option[/color] [COLOR=blue]Strict[/color] [COLOR=blue]Off[/color]  
[COLOR=blue]Imports[/color] System  
[COLOR=blue]Imports[/color] NXOpen  

[COLOR=blue]Module[/color] NXJournal  
[COLOR=blue]Sub[/color] Main  

[COLOR=blue]Dim[/color] theSession [COLOR=blue]As[/color] Session [COLOR=blue]=[/color] Session.GetSession()  
[COLOR=blue]Dim[/color] workPart [COLOR=blue]As[/color] Part [COLOR=blue]=[/color] theSession.Parts.Work  
[COLOR=blue]Dim[/color] displayPart [COLOR=blue]As[/color] Part [COLOR=blue]=[/color] theSession.Parts.Display  
[COLOR=blue]Dim[/color] ufs [COLOR=blue]As[/color] UF.UFSession [COLOR=blue]=[/color] UF.UFSession.GetUFSession()  

[COLOR=blue]dim[/color] myTag [COLOR=blue]as[/color] Tag					  [COLOR=green]'tag for the new spline to be created[/color]
[COLOR=blue]dim[/color] mySpline [COLOR=blue]as[/color] Spline [COLOR=blue]=[/color] nothing	  [COLOR=green]'object variable for new spline[/color]
[COLOR=blue]dim[/color] degree [COLOR=blue]as[/color] [COLOR=blue]integer[/color] [COLOR=blue]=[/color] 3			  [COLOR=green]'degree of spline created[/color]
[COLOR=blue]dim[/color] periodicity [COLOR=blue]as[/color] [COLOR=blue]integer[/color] [COLOR=blue]=[/color] 0		  [COLOR=green]'0 for non-periodic, 1 for periodic (closed) spline[/color]
[COLOR=blue]dim[/color] numPoints [COLOR=blue]as[/color] [COLOR=blue]integer[/color] [COLOR=blue]=[/color] 4		  [COLOR=green]'number of points passed to the CreateSplineThruPts method[/color]

[COLOR=green]'declare and populate point data[/color]
[COLOR=blue]dim[/color] pt0(2) [COLOR=blue]as[/color] [COLOR=blue]double[/color]  
[COLOR=blue]dim[/color] pt1(2) [COLOR=blue]as[/color] [COLOR=blue]double[/color]  
[COLOR=blue]dim[/color] pt2(2) [COLOR=blue]as[/color] [COLOR=blue]double[/color]  
[COLOR=blue]dim[/color] pt3(2) [COLOR=blue]as[/color] [COLOR=blue]double[/color]  

pt0(0) [COLOR=blue]=[/color] 0  
pt0(1) [COLOR=blue]=[/color] 2  
pt0(2) [COLOR=blue]=[/color] 0  

pt1(0) [COLOR=blue]=[/color] 2  
pt1(1) [COLOR=blue]=[/color] 1  
pt1(2) [COLOR=blue]=[/color] 0  

pt2(0) [COLOR=blue]=[/color] 4  
pt2(1) [COLOR=blue]=[/color] 3  
pt2(2) [COLOR=blue]=[/color] 0  

pt3(0) [COLOR=blue]=[/color] 6  
pt3(1) [COLOR=blue]=[/color] 0  
pt3(2) [COLOR=blue]=[/color] 0  

[COLOR=blue]dim[/color] ptdata() [COLOR=blue]as[/color] NXOpen.UF.UFCurve.PtSlopeCrvatr  
[COLOR=blue]redim[/color] ptdata(3)  

ptdata(0).point [COLOR=blue]=[/color] pt0  
ptdata(0).slope_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_SLOPE_AUTO  
ptdata(0).crvatr_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_CRVATR_NONE  

ptdata(1).point [COLOR=blue]=[/color] pt1  
ptdata(1).slope_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_SLOPE_NONE  
ptdata(1).crvatr_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_CRVATR_NONE  

ptdata(2).point [COLOR=blue]=[/color] pt2  
ptdata(2).slope_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_SLOPE_NONE  
ptdata(2).crvatr_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_CRVATR_NONE  

ptdata(3).point [COLOR=blue]=[/color] pt3  
ptdata(3).slope_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_SLOPE_AUTO  
ptdata(3).crvatr_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_CRVATR_NONE  

[COLOR=green]'ufs.Curve.CreateSplineThruPts(degree, periodicity, numPoints, ptdata, _[/color]
[COLOR=green]' user specified parameterization of input points: use 'nothing' for default parameterization, _[/color]
[COLOR=green]' save defining data? 1 = yes (anything else = no) , return tag variable of new spline)[/color]

ufs.Curve.CreateSplineThruPts(degree, periodicity, numPoints, ptdata, nothing, 0, myTag)  

[COLOR=green]'convert Tag reference to NXOpen object[/color]
mySpline [COLOR=blue]=[/color] Utilities.NXObjectManager.Get(myTag)  
[COLOR=green]'prove that the above line worked[/color]
msgbox("Length [COLOR=blue]of[/color] spline: " [COLOR=blue]&[/color] mySpline.GetLength)  

End [COLOR=blue]Sub[/color]  
End [COLOR=blue]Module[/color]


 
Thanks cowski!

Now I understand the spline construction. Still working on the overall picture. More posts to come ;)

Jeff
 
Okay. it seems as though I keep missing something fundamental, but I can't see what it is. I can get your code to work with explicit points, but when I run those points (generated from other code) it doesn't work.

The problem is I am assigning the .point data in a For-Next Loop and it reports everything ok, but as soon as I exit the loop it only remembers the last value.

Code:
for p as integer = 0 to kk-1
	pointdouble(0)=cpoint(p).coordinates.X
	pointdouble(1)=cpoint(p).coordinates.Y
	pointdouble(2)=cpoint(p).coordinates.Z

	point_data1(p).point = pointdouble
	point_data1(p).slope_type = UFConstants.UF_CURVE_SLOPE_NONE
	point_data1(p).crvatr_type = UFConstants.UF_CURVE_CRVATR_NONE
	
	lw.writeline("K= " & p.tostring &": " &point_data1(p).point(0) &","&point_data1(p).point(1) &","&point_data1(p).point(2))
next p

for p as integer = 0 to kk-1
	lw.writeline("K= " & p.tostring &": " &point_data1(p).point(0) &","&point_data1(p).point(1) &","&point_data1(p).point(2))
next

Gives me:
K= 0: 80.0068723329663,0.000311697607848771,25.0000086444894
K= 1: 82.6184557205712,0.0890023374493865,25.0002787371683
K= 2: 85.3356535714023,0.362087419874367,24.9997263024703
K= 3: 88.0324414244833,0.840184094211939,25.0008079122174
K= 4: 90.6374012069239,1.52693367761155,25.0014357866076
K= 5: 93.0355329341884,2.41816831811692,24.9993864675541
K= 6: 95.1594576479436,3.48239559087328,24.9988022552044
K= 7: 96.9428619602756,4.68411422968257,25.0003322542663
K= 8: 98.3237291689222,5.98321234054376,24.9988888939346
K= 9: 99.2751578945642,7.33331493597748,25.0002114846827
K= 10: 99.8265572327264,8.68491999661199,24.9998931806953
K= 11: 100,10,25
K= 0: 100,10,25
K= 1: 100,10,25
K= 2: 100,10,25
K= 3: 100,10,25
K= 4: 100,10,25
K= 5: 100,10,25
K= 6: 100,10,25
K= 7: 100,10,25
K= 8: 100,10,25
K= 9: 100,10,25
K= 10: 100,10,25
K= 11: 100,10,25

So as soon as I exit the loop my point values are "lost". This is probably something VB related which I don't understand, and I guess I'm sorely lacking in VB training.

Thanks (again),
Jeff
 
I tried to reproduce your error in my code, but was unable to.

Boil your code down to a small journal that exhibits the error and we'll step through the whole thing.

For what it's worth, here's my test code:
Code:
[COLOR=blue]Option[/color] [COLOR=blue]Strict[/color] [COLOR=blue]Off[/color]  
[COLOR=blue]Imports[/color] System  
[COLOR=blue]Imports[/color] NXOpen  

[COLOR=blue]Module[/color] Module1  

 [COLOR=green]'  Explicit Activation[/color]
 [COLOR=green]'      This entry point is used to activate the application explicitly[/color]
    [COLOR=blue]Sub[/color] Main()  

        [COLOR=blue]Dim[/color] theSession [COLOR=blue]As[/color] Session [COLOR=blue]=[/color] Session.GetSession()  
        [COLOR=blue]Dim[/color] workPart [COLOR=blue]As[/color] Part [COLOR=blue]=[/color] theSession.Parts.Work  
        [COLOR=blue]Dim[/color] displayPart [COLOR=blue]As[/color] Part [COLOR=blue]=[/color] theSession.Parts.Display  
        [COLOR=blue]Dim[/color] ufs [COLOR=blue]As[/color] UF.UFSession [COLOR=blue]=[/color] UF.UFSession.GetUFSession()  
        [COLOR=blue]Dim[/color] lw [COLOR=blue]As[/color] ListingWindow [COLOR=blue]=[/color] theSession.ListingWindow  

[COLOR=blue]Dim[/color] myTag [COLOR=blue]As[/color] Tag  [COLOR=green]'tag for the new spline to be created[/color]
[COLOR=blue]Dim[/color] mySpline [COLOR=blue]As[/color] Spline [COLOR=blue]=[/color] [COLOR=blue]Nothing[/color]  [COLOR=green]'object variable for new spline[/color]
[COLOR=blue]Dim[/color] degree [COLOR=blue]As[/color] [COLOR=blue]Integer[/color] [COLOR=blue]=[/color] 3  [COLOR=green]'degree of spline created[/color]
[COLOR=blue]Dim[/color] periodicity [COLOR=blue]As[/color] [COLOR=blue]Integer[/color] [COLOR=blue]=[/color] 0  [COLOR=green]'0 for non-periodic, 1 for periodic (closed) spline[/color]
[COLOR=blue]Dim[/color] numPoints [COLOR=blue]As[/color] [COLOR=blue]Integer[/color] [COLOR=blue]=[/color] 4  [COLOR=green]'number of points passed to the CreateSplineThruPts method[/color]

 [COLOR=green]'declare and populate point data[/color]
        [COLOR=blue]Dim[/color] pt0(2) [COLOR=blue]As[/color] [COLOR=blue]Double[/color]  
        [COLOR=blue]Dim[/color] pt1(2) [COLOR=blue]As[/color] [COLOR=blue]Double[/color]  
        [COLOR=blue]Dim[/color] pt2(2) [COLOR=blue]As[/color] [COLOR=blue]Double[/color]  
        [COLOR=blue]Dim[/color] pt3(2) [COLOR=blue]As[/color] [COLOR=blue]Double[/color]  

        pt0(0) [COLOR=blue]=[/color] 0  
        pt0(1) [COLOR=blue]=[/color] 2  
        pt0(2) [COLOR=blue]=[/color] 0  

        pt1(0) [COLOR=blue]=[/color] 2  
        pt1(1) [COLOR=blue]=[/color] 1  
        pt1(2) [COLOR=blue]=[/color] 0  

        pt2(0) [COLOR=blue]=[/color] 4  
        pt2(1) [COLOR=blue]=[/color] 3  
        pt2(2) [COLOR=blue]=[/color] 0  

        pt3(0) [COLOR=blue]=[/color] 6  
        pt3(1) [COLOR=blue]=[/color] 0  
        pt3(2) [COLOR=blue]=[/color] 0  

        [COLOR=blue]Dim[/color] ptdata() [COLOR=blue]As[/color] NXOpen.UF.UFCurve.PtSlopeCrvatr  
        [COLOR=blue]ReDim[/color] ptdata(3)  

        ptdata(0).point [COLOR=blue]=[/color] pt0  
        ptdata(0).slope_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_SLOPE_AUTO  
        ptdata(0).crvatr_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_CRVATR_NONE  

        ptdata(1).point [COLOR=blue]=[/color] pt1  
        ptdata(1).slope_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_SLOPE_NONE  
        ptdata(1).crvatr_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_CRVATR_NONE  

        ptdata(2).point [COLOR=blue]=[/color] pt2  
        ptdata(2).slope_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_SLOPE_NONE  
        ptdata(2).crvatr_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_CRVATR_NONE  

        ptdata(3).point [COLOR=blue]=[/color] pt3  
        ptdata(3).slope_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_SLOPE_AUTO  
        ptdata(3).crvatr_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_CRVATR_NONE  

 [COLOR=green]'ufs.Curve.CreateSplineThruPts(degree, periodicity, numPoints, ptdata, _[/color]
 [COLOR=green]' user specified parameterization of input points: use 'nothing' for default parameterization, _[/color]
 [COLOR=green]' save defining data? 1 = yes (anything else = no) , return tag variable of new spline)[/color]

        ufs.Curve.CreateSplineThruPts(degree, periodicity, numPoints, ptdata, Nothing, 0, myTag)  

 [COLOR=green]'convert Tag reference to NXOpen object[/color]
        mySpline [COLOR=blue]=[/color] Utilities.NXObjectManager.Get(myTag)  
 [COLOR=green]'prove that the above line worked[/color]
        MsgBox("Length [COLOR=blue]of[/color] spline: " [COLOR=blue]&[/color] mySpline.GetLength)  

        lw.Open()  
        [COLOR=blue]For[/color] i [COLOR=blue]As[/color] [COLOR=blue]Integer[/color] [COLOR=blue]=[/color] 0 [COLOR=blue]To[/color] 3  
            lw.WriteLine(ptdata(i).point(0))  
            lw.WriteLine(ptdata(i).point(1))  
            lw.WriteLine(ptdata(i).point(2))  
            lw.WriteLine("")  
        [COLOR=blue]Next[/color]  

    End [COLOR=blue]Sub[/color]  


    [COLOR=blue]Public[/color] [COLOR=blue]Function[/color] GetUnloadOption(ByVal dummy [COLOR=blue]As[/color] [COLOR=blue]String[/color]) [COLOR=blue]As[/color] [COLOR=blue]Integer[/color]  

 [COLOR=green]'Unloads the image when the NX session terminates[/color]
        GetUnloadOption [COLOR=blue]=[/color] NXOpen.Session.LibraryUnloadOption.AtTermination  

    End [COLOR=blue]Function[/color]  

End [COLOR=blue]Module[/color]


 
Here's my point_data1 declarations:

Code:
dim point_data1() as NXOpen.UF.UFCurve.PtSlopeCrvatr
...figure out value kk...
redim point_data1(kk-1)

I'll see if I can isolate a small working (or not) part of code that can be reproduced.

It's a question of assigning the .point values in the for-next loop.

Thanks,
Jeff
 
It is some years since I used the ufunc UF_CURVE_create_spline_thru_pts in c programs. What I do remember is that when the number of points was more than a certain number (I don't remember the actual number) I had to allocate memory for the spline data. Note that the documentation makes no reference to this.

In the data that was written out I note that at k = 11 the data written out is the only data that is saved.

I think the wrapper method does not allocate space correctly.

I have two suggestions. One is to reduce the number of spline points and write out the data to test my theory. If this is proven then this wrapper method is of little use to you therefore my second suggestion is to use the spline class. If rquired I can make an example journal available.

Frank Swinkels
 
Jeff,

I modified my code to use loops similar to yours and saw the same problem. I think the problem is because objects (the ptdata object in our case) are reference types. This means they act like pointers; so when we loop through and change the data in pointdouble(), the object points to the new data rather than copying it into a separate variable.

One possible workaround would be to hold your point data in an array of arrays so that you have a separate copy of each point. This method is demonstrated below:
Code:
[COLOR=blue]Option[/color] [COLOR=blue]Strict[/color] [COLOR=blue]Off[/color]  
[COLOR=blue]Imports[/color] System  
[COLOR=blue]Imports[/color] NXOpen  

[COLOR=blue]Module[/color] Module1  

 [COLOR=green]'  Explicit Activation[/color]
 [COLOR=green]'      This entry point is used to activate the application explicitly[/color]
    [COLOR=blue]Sub[/color] Main()  

        [COLOR=blue]Dim[/color] theSession [COLOR=blue]As[/color] Session [COLOR=blue]=[/color] Session.GetSession()  
        [COLOR=blue]Dim[/color] workPart [COLOR=blue]As[/color] Part [COLOR=blue]=[/color] theSession.Parts.Work  
        [COLOR=blue]Dim[/color] displayPart [COLOR=blue]As[/color] Part [COLOR=blue]=[/color] theSession.Parts.Display  
        [COLOR=blue]Dim[/color] ufs [COLOR=blue]As[/color] UF.UFSession [COLOR=blue]=[/color] UF.UFSession.GetUFSession()  
        [COLOR=blue]Dim[/color] lw [COLOR=blue]As[/color] ListingWindow [COLOR=blue]=[/color] theSession.ListingWindow  

[COLOR=blue]Dim[/color] myTag [COLOR=blue]As[/color] Tag  [COLOR=green]'tag for the new spline to be created[/color]
[COLOR=blue]Dim[/color] mySpline [COLOR=blue]As[/color] Spline [COLOR=blue]=[/color] [COLOR=blue]Nothing[/color]  [COLOR=green]'object variable for new spline[/color]
[COLOR=blue]Dim[/color] degree [COLOR=blue]As[/color] [COLOR=blue]Integer[/color] [COLOR=blue]=[/color] 3  [COLOR=green]'degree of spline created[/color]
[COLOR=blue]Dim[/color] periodicity [COLOR=blue]As[/color] [COLOR=blue]Integer[/color] [COLOR=blue]=[/color] 0  [COLOR=green]'0 for non-periodic, 1 for periodic (closed) spline[/color]
[COLOR=blue]Dim[/color] numPoints [COLOR=blue]As[/color] [COLOR=blue]Integer[/color] [COLOR=blue]=[/color] 4  [COLOR=green]'number of points passed to the CreateSplineThruPts method[/color]

        [COLOR=blue]Dim[/color] rand1 [COLOR=blue]As[/color] [COLOR=blue]New[/color] Random  
        [COLOR=blue]Dim[/color] myPoints()() [COLOR=blue]As[/color] [COLOR=blue]Double[/color] [COLOR=blue]=[/color] [COLOR=blue]New[/color] Double(numPoints [COLOR=blue]-[/color] 1)() {}  

 [COLOR=green]'declare and populate point data[/color]
        [COLOR=blue]Dim[/color] pt0(2) [COLOR=blue]As[/color] [COLOR=blue]Double[/color]  

        lw.Open()  

        [COLOR=blue]For[/color] i [COLOR=blue]As[/color] [COLOR=blue]Integer[/color] [COLOR=blue]=[/color] 0 [COLOR=blue]To[/color] numPoints [COLOR=blue]-[/color] 1  
            myPoints(i) [COLOR=blue]=[/color] [COLOR=blue]New[/color] Double(2) {}  
            [COLOR=blue]For[/color] j [COLOR=blue]As[/color] [COLOR=blue]Integer[/color] [COLOR=blue]=[/color] 0 [COLOR=blue]To[/color] 2  
                myPoints(i)(j) [COLOR=blue]=[/color] rand1.Next(-10, 10)  
                lw.WriteLine(myPoints(i)(j))  
            [COLOR=blue]Next[/color]  
            lw.WriteLine("")  
        [COLOR=blue]Next[/color]  

        [COLOR=blue]Dim[/color] ptdata() [COLOR=blue]As[/color] NXOpen.UF.UFCurve.PtSlopeCrvatr  
        [COLOR=blue]ReDim[/color] ptdata(numPoints [COLOR=blue]-[/color] 1)  

        [COLOR=blue]For[/color] i [COLOR=blue]As[/color] [COLOR=blue]Integer[/color] [COLOR=blue]=[/color] 0 [COLOR=blue]To[/color] numPoints [COLOR=blue]-[/color] 1  
            ptdata(i).point [COLOR=blue]=[/color] myPoints(i)  
            ptdata(i).slope_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_SLOPE_NONE  
            ptdata(i).crvatr_type [COLOR=blue]=[/color] UF.UFConstants.UF_CURVE_CRVATR_NONE  
            lw.WriteLine(ptdata(i).point(0) [COLOR=blue]&[/color] ", " [COLOR=blue]&[/color] ptdata(i).point(1) [COLOR=blue]&[/color] ", " [COLOR=blue]&[/color] ptdata(i).point(2))  
        [COLOR=blue]Next[/color]  

    End [COLOR=blue]Sub[/color]  

    [COLOR=blue]Public[/color] [COLOR=blue]Function[/color] GetUnloadOption(ByVal dummy [COLOR=blue]As[/color] [COLOR=blue]String[/color]) [COLOR=blue]As[/color] [COLOR=blue]Integer[/color]  

 [COLOR=green]'Unloads the image when the NX session terminates[/color]
        GetUnloadOption [COLOR=blue]=[/color] NXOpen.Session.LibraryUnloadOption.AtTermination  

    End [COLOR=blue]Function[/color]  

End [COLOR=blue]Module[/color]

I don't bother to create the spline in this journal since the data is random. It might make for some interesting looking, but useless splines. The code above uses only 4 points, but I have tested with up to 50 points and all was well.

 
Thanks for all your input. I moved the declaration of "pointdouble" inside the for-next loop and everything seems to work now.

Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor