Jump to content


VBScript addSpline

vbscritpt addSpline script

1 reply to this topic

#1 jan.karnik

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 27 January 2018 - 11:21 PM

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


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


#2 Gianfranco Lanza

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 18 August 2021 - 06:37 PM

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





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users