VBScript addSpline
jan.karnik
27 Jan 2018
Hello,
I am first time trying to draw some simple objects using Nano Cad. Quite tricky as I was not able to find any programming reference. Can you please help me?
I am attaching my script,
I am getting error err: "TeighaX" raised an exception "Incorrect parameter." at line 32 pos 4 (at Set splineObj =...)
Can you please help?
Thank you
Jan
I am first time trying to draw some simple objects using Nano Cad. Quite tricky as I was not able to find any programming reference. Can you please help me?
I am attaching my script,
I am getting error err: "TeighaX" raised an exception "Incorrect parameter." at line 32 pos 4 (at Set splineObj =...)
Can you please help?
Thank you
Jan
Sub Example_AddSpline()
Dim splineObj
Dim startTan
Dim endTan
Dim fitPoints
startTan="0.5,0.5,0"
endTan="0.5,0.5,0"
fitPoints=array ("1,1,0","5,5,0","10,0,0")
Set splineObj = ThisDrawing.ModelSpace.AddSpline(fitPoints, startTan, endTan)
End Sub
call Example_AddSpline()
msgbox("zoom all")
' ZoomAll
ThisDrawing.Utility.Prompt "Perform a ZoomAll"
ThisDrawing.Application.ZoomAll
Gianfranco Lanza
18 Aug 2021
Hello Jan,
also I'm having the same error and I don't understand how to solve it.
Did you find a solution?
Thanks
Gianfranco
also I'm having the same error and I don't understand how to solve it.
Did you find a solution?
Thanks
Gianfranco
Dsw
23 May 2024
Hello,
using VBS loaded from nanoCAD, you can simple write a single line of code to add a Spline.
using VBS loaded from nanoCAD, you can simple write a single line of code to add a Spline.
ThisDrawing.ModelSpace.AddSpline "1.0,1.0,0.0,5.0,5.0,0.0,10.0,0.0,0.0", "0.5,0.0,0.0", "0.5,0.5,0.0"


