How to extract the data file which consist of geometric shape

Hi

I want to extract the control point, knot vector and order of geometric shape using the RhinoScript and to store the data file in a file format.
What method should I use to do that?

In advance, Thank you for your help.

RhinoScript has lots of methods for querying curves.

http://4.rhino3d.com/5/rhinoscript/curve_methods/curve_methods.htm

VBScript supports reading and writing text files.

Thank you for your good reply.
These days, I try doing examples as practice using some methods.
But I have some problem on running the script.
Could you tell me the reason it does not work.

Dim strObject, arrPoints, arrPoint
strObject = Rhino.GetObject(“Select a curve”)
If Rhino.IsCurve(strObject) Then
arrPoints = Rhino.CurvePoints(strObject)
If IsArray(arrPoints) Then
For Each arrPoint In arrPoints
’Rhino.AddPoint arrPoint
Rhino.Print "Curve control point value: " & CStr(arrPoint)
Next
End If
End If

You could use:
Rhino.Print "Curve control point value: " & Rhino.Pt2Str(arrPoint)
if it’s the coords you wish to find.

Thank you for your help…

Could I ask you a question once more?
I want to save a control points in format of a text file instead of command line.
What method should I use?