VB 6 command and VB.Net command

Dear All

I am using this command in VB 6

len2SPt = Rhino.CurveLength(baseCurve, , Array(crvDom(0), dClosePt))

but when i use same command in VB.net. it gives me and Error : Array is a type and can not be use as Expression

Public obj As Object = RhUtil.RhinoApp.GetRhinoScriptInterface()
Public RScript As RhinoScript4.IRhinoScript = CType(obj, RhinoScript4.IRhinoScript)
len2SPt =RScript.CurveLength(baseCurve, , Array(crvDom(0), dClosePt))

any Idea ???

Or any other method to get the distance of the point on the curve from the starting point of the curve using VB.net

Any one …???

Public obj As Object = RhUtil.RhinoApp.GetRhinoScriptInterface()
Public RScript As RhinoScript4.IRhinoScript = CType(obj, RhinoScript4.IRhinoScript)
crvDom = RScript.CurveDomain(baseCurve)
len2SPt =RScript.CurveLength(baseCurve, , Array(crvDom(0), dClosePt))

I think there is problem in crvDom = RScript.CurveDomain(baseCurve).
In rhino script the return of this command is array and in vb.net return shows the object
as i dont get the return in array of crvDom in vb.net i am not able to pass the parameter crvDom(0) to RScript.CurveLength(baseCurve, , Array(crvDom(0), dClosePt))

and also the Array(crvDom(0), dClosePt) is not supported in .net it says Array is type and can not be used as expression

Gyus any Idea how to solve this ???

See my answer to your question in this thread:

Does this help?