Forgot password?

Create an account!

Forum

« back

RhinoScript – Trouble with my Rhinoscript

Messages

Please log in to write a message.

  • 2. maorstamati (Mar 20, 2011 22.05):

    Sorry, I have realized that the parts are not hichlighted so I'm sending the code again...

    Option Explicit
    'Project 491-492 RhinoScript

    'Variables defined

    Dim strobjectid
    Dim i, x, y, z, count,numobjects
    Dim arrbox, arrPoint(2), arrsurfacepoints(3), arrx, arry, arrz
    Dim xmax, xmin, ymax, ymin, zmax, zmin
    Dim xstep, ystep, zstep
    Dim strxline, stryline, arrCCX
    Dim arrXpts(), ptcount
    Dim arrObjects()
    Dim arrBase, arrHeight, dblRadius
    Dim arrStartPoint(2), arrEndPoint(2), arrContours, CheckSurface, blnIntersection

    Call Main ()
    Call ExportPoints 'The function for exporting the intersection points to a text file

    Sub Main ()

    numobjects=0
    'the object is selected by the user
    strobjectid=Rhino.GetObject ("Select object", 0, True)
    ReDim Preserve arrobjects(numobjects)
    arrObjects(numobjects) = strobjectid

    numobjects=numobjects+1


    'Get bounding box limits
    If Rhino.IsObject(strobjectid) Then

    arrbox=Rhino.Boundingbox(strobjectid)

    End If

    If IsNull(arrbox) Then
    Call Rhino.Print("Something Went Wrong!")
    Exit Sub
    End If


    'Printing the Boundingbox limits
    For i=0 To UBound(arrBox)

    Rhino.Print(i+1 & ". point of bounding box is:" & Rhino.Pt2Str(arrbox(i), 3))

    Next

    'Getting distances between lines in x,y,z directions
    zstep=Rhino.GetReal("Enter number to be distance between lines in z direction, this distance will be also the radius of the material to be injected:",0.05,0,0.1)
    xstep=Rhino.GetReal("Enter number to be distance between lines in x direction:",0.05,0,0.1) + 2*zstep
    ystep=Rhino.GetReal("Enter number to be distance between lines in y direction:",0.05,0,0.1) + 2*zstep



    arrx=Array(arrbox(0)(0),arrbox(1)(0),arrbox(2)(0),arrbox(3)(0),arrbox(4)(0),arrbox(5)(0),arrbox(6)(0),arrbox(7)(0))
    arry=Array(arrbox(0)(1),arrbox(1)(1),arrbox(2)(1),arrbox(3)(1),arrbox(4)(1),arrbox(5)(1),arrbox(6)(1),arrbox(7)(1))
    arrz=Array(arrbox(0)(2),arrbox(1)(2),arrbox(2)(2),arrbox(3)(2),arrbox(4)(2),arrbox(5)(2),arrbox(6)(2),arrbox(7)(2))

    'Determining min and max values in x,y,z of the bounding box
    xmin = Rhino.Min(arrx)
    xmax = Rhino.Max(arrx)
    ymin = Rhino.Min(arry)
    ymax = Rhino.Max(arry)
    zmin = Rhino.Min(arrz)
    zmax = Rhino.Max(arrz)

    arrPoint(0)= xmin
    arrPoint(1)= ymin
    arrPoint(2)= zmin
    arrsurfacepoints(0)=arrPoint

    arrPoint(0)= xmin
    arrPoint(1)= ymax
    arrPoint(2)= zmin
    arrsurfacepoints(1)=arrPoint

    arrPoint(0)= xmax
    arrPoint(1)= ymax
    arrPoint(2)= zmin
    arrsurfacepoints(2)=arrPoint

    arrPoint(0)= xmax
    arrPoint(1)= ymin
    arrPoint(2)= zmin
    arrsurfacepoints(3)=arrPoint

    CheckSurface=Rhino.AddSrfPt (arrsurfacepoints)

    ReDim Preserve arrobjects(numobjects)
    arrObjects(numobjects) = CheckSurface

    arrStartPoint(0)=(xmax+xmin)/2
    arrStartPoint(1)=(ymax+ymin)/2
    arrStartPoint(2)=zmin

    arrEndPoint(0)=(xmax+xmin)/2
    arrEndPoint(1)=(ymax+ymin)/2
    arrEndPoint(2)=zmax

    arrContours=Rhino.AddSrfContourCrvs (strobjectid, arrStartPoint, arrEndPoint, zstep)

    blnIntersection=Rhino.CurveSurfaceIntersection (arrContours(0), CheckSurface)

    If IsNull (blnIntersection) Then

    Rhino.Print("The Object has a rounded bottom surface")

    Call Rounded() 'The function for polysurfaces with rounded bottom surface (ex. a sphere)

    Else

    Rhino.Print("The Object has a rounded bottom surface")

    Call Cornered() 'The function for polysurfaces with cornered bottom surface (ex. a sphere)

    End If

    End Sub

    Sub Rounded()

    count=0
    ptcount=0
    'drawing the lines on the object
    Rhino.EnableRedraw(False)

    For z=zmin To zmax Step zstep

    If count Mod 2 =0 Then

    For y=ymin To ymax Step ystep

    numobjects=numobjects+1
    strxline=Rhino.AddLine (Array(xmin,y,z),Array(xmax,y,z))


    If count>0 Then
    arrCCX=Rhino.CurveCurveIntersection(strxline, arrContours(count-1))
    End If

    ReDim Preserve arrObjects(numobjects)
    arrObjects (numobjects)=strxline


    If IsArray(arrCCX) Then

    ReDim Preserve arrXpts(ptcount+1)

    If ptcount Mod 2=0 Then

    arrXpts(ptcount)=arrCCX(0,1)

            arrXpts(ptcount+1)=arrCCX(1,1)


    Else

    arrXpts(ptcount)=arrCCX(1,1)
    arrXpts(ptcount+1)=arrCCX(0,1)

    End If
    ptcount=ptcount+2
    End If

    Next


    Else

    For x=xmin To xmax Step xstep

    numobjects=numobjects+1

    stryline=Rhino.AddLine (Array(x,ymin,z),Array(x,ymax,z))
    arrCCX=Rhino.CurveCurveIntersection(stryline, arrContours(count-1))

    ReDim Preserve arrObjects(numobjects)
    arrObjects (numobjects) =strxline


    If IsArray(arrCCX) Then

    ReDim Preserve arrXpts(ptcount+1)

    If ptcount Mod 2=0 Then

    arrXpts(ptcount)=arrCCX(0,1)

            arrXpts(ptcount+1)=arrCCX(1,1)


    Else

    arrXpts(ptcount)=arrCCX(1,1)
    arrXpts(ptcount+1)=arrCCX(0,1)

    End If
    ptcount=ptcount+2

    End If

    Next
    End If
    count=count+1
    Next
    Rhino.EnableRedraw(True)

    If IsArray(arrObjects) Then

    Rhino.DeleteObjects(arrObjects)

    End If

    dblRadius=zstep/2

    Rhino.EnableRedraw(False)

    For i=0 To Ubound(arrXpts)-1 Step 2

    arrBase=arrXpts(i)
    arrHeight=arrXpts(i+1)
    Rhino.AddCylinder arrBase, arrHeight, dblRadius

    Next

    Rhino.Enable Redraw (True)

    End Sub

    Sub Cornered()

    count=0
    ptcount=0
    'drawing the lines on the object


    Rhino.EnableRedraw(False)

    For z=zmin To zmax Step zstep

    If count Mod 2 =0 Then

    For y=ymin To ymax Step ystep

    numobjects=numobjects+1
    strxline=Rhino.AddLine (Array(xmin,y,z),Array(xmax,y,z))

    blnIntersection=Rhino.CurveSurfaceIntersection (arrContours(0), CheckSurface)

    If IsNull (blnIntersection) Then Exit Sub

    arrCCX=Rhino.CurveCurveIntersection(strxline, arrContours(count))

    ReDim Preserve arrObjects(numobjects)
    arrObjects (numobjects)=strxline


    If IsArray(arrCCX) Then

    ReDim Preserve arrXpts(ptcount+1)

    If ptcount Mod 2=0 Then

    arrXpts(ptcount)=arrCCX(0,1)
    arrXpts(ptcount+1)=arrCCX(1,1)

    Else

    arrXpts(ptcount)=arrCCX(1,1)
    arrXpts(ptcount+1)=arrCCX(0,1)

    End If
    ptcount=ptcount+2
    End If

    Next


    Else

    For x=xmin To xmax Step xstep

    numobjects=numobjects+1

    stryline=Rhino.AddLine (Array(x,ymin,z),Array(x,ymax,z))
    arrCCX=Rhino.CurveCurveIntersection(stryline, arrContours(count))

    ReDim Preserve arrObjects(numobjects)
    arrObjects (numobjects) =strxline


    If IsArray(arrCCX) Then

    ReDim Preserve arrXpts(ptcount+1)

    If ptcount Mod 2=0 Then

    arrXpts(ptcount)=arrCCX(0,1)
    arrXpts(ptcount+1)=arrCCX(1,1)

    Else

    arrXpts(ptcount)=arrCCX(1,1)
    arrXpts(ptcount+1)=arrCCX(0,1)

    End If
    ptcount=ptcount+2

    End If

    Next
    End If
    count=count+1
    Next
    Rhino.EnableRedraw(True)

    If IsArray(arrObjects) Then

    Rhino.DeleteObjects(arrObjects)

    End If

    dblRadius=zstep/2

    Rhino.EnableRedraw(False)

    For i=0 To Ubound(arrXpts)-1 Step 2

    arrBase=arrXpts(i)
    arrHeight=arrXpts(i+1)
    Rhino.AddCylinder arrBase, arrHeight, dblRadius

    Next

    Rhino.EnableRedraw(True)




    End Sub

    Sub ExportPoints

    Dim strObject, arrPoints, arrPoint, strPoint

    Dim strFileName, strFilter, objFSO, objStream

    Dim strPreX, strPreY, strPreZ

    Dim strPostX, strPostY, strPostZ

    Dim strDelimiter

    ' User-definable prefixes

    strPreX = ""

    strPreY = ""

    strPreZ = ""

    ' User-definable postfixes

    strPostX = ""

    strPostY = ""

    strPostZ = ""

    ' User-definable delimiter(s)

    strDelimiter = ","

    ' User-definable file filters

    strFilter = "Text File (*.txt)|*.txt|All Files (*.*)|*.*||"

    ' Get the points to export

    If IsNull(arrXpts) Then Exit Sub

    ' Get the filename to create

    strFileName = Rhino.SaveFileName("Save Point Coordinates As", strFilter)

    If IsNull(strFileName) Then Exit Sub

    ' Get the file system object

    Set objFSO = CreateObject("Scripting.FileSystemObject")

    On Error Resume Next

    ' Get a new text file

    Set objStream = objFSO.CreateTextFile(strFileName, True)

    If Err Then

    MsgBox Err.Description

    Exit Sub

    End If

    For Each strObject In arrXpts

    ' Process point clouds

    If Rhino.IsPointCloud(strObject) Then

    arrPoints = Rhino.PointCloudPoints(strObject)

    If IsArray(arrPoints) Then

    For Each arrPoint In ArrPoints

    strPoint = strPreX & CStr(arrPoint(0)) & strPostX & strDelimiter & strPreY & CStr(arrPoint(1)) & strPostY & strDelimiter & strPreZ & CStr(arrPoint(2)) & strPostZ

    ' Write the coordinate to the file

    objStream.WriteLine(strPoint)

    Next

    End If

    ' Process point clouds

    ElseIf Rhino.IsPoint(strObject) Then

    arrPoint = Rhino.PointCoordinates(strObject)

    If IsArray(arrPoint) Then

    strPoint = strPreX & CStr(arrPoint(0)) & strPostX & strDelimiter & strPreY & CStr(arrPoint(1)) & strPostY & strDelimiter & strPreZ & CStr(arrPoint(2)) & strPostZ

    ' Write the coordinate to the file

    objStream.WriteLine(strPoint)

    End If

    End If

    Next

    ' Write the file

    objStream.Close

    End Sub

  • 1. maorstamati (Mar 20, 2011 22.02):

    Hi,

    I am trying to write a script for my project at university and I'm having some troubles that I haven't been able to solve for a while. So I have decided to write here hoping to have some help.

    As a summary in the project I have to draw lines on any object and get the intersection points of these lines with my object in order to use them later on as coordinate points for 3D printing. When I run my code I am trying it with any sphere that the user draws on the screen and selects it. Then the code asks for the intervals between the lines in x,y and z directions. Then contour curves of the object are created and the intersection points of the contour curves and the lines are taken into

    arrXpts

    array. The code works fine for a while, but then an error appears on the screen saying

    "subscript out of range"

    . I have tried to debug but it is really hard to find the problem because I have to click "run into" button for like 1000 times and until the error there is no apparent problem.

    The second trouble is that I have to delete all objects on the screen so that I could draw cylinders on the paths of the lines that are created before. I have tried to collect all drawn objects in an array arrobjects so that I would delete all with

    Rhino.DeleteObjects (arrObjects)

    command, but the objects are not deleted somehow.

    The third and last problem is that I have to export all the intersection points to a text file so that I would use them later on. However, when I'm trying to modify the

    ExportPoints

    function for my code the points are not exported and the created file remains empty.

    My code is below and I hope that someone will at least tell me where I'm doing wrong so I will have an idea to fix the problems.

    Thanks a lot,

    Maor

    P.S. The lines that the error message tells me are highlighted...

    The code:

    Option Explicit
    'Project 491-492 RhinoScript

    'Variables defined

    Dim strobjectid
    Dim i, x, y, z, count,numobjects
    Dim arrbox, arrPoint(2), arrsurfacepoints(3), arrx, arry, arrz
    Dim xmax, xmin, ymax, ymin, zmax, zmin
    Dim xstep, ystep, zstep
    Dim strxline, stryline, arrCCX
    Dim arrXpts(), ptcount
    Dim arrObjects()
    Dim arrBase, arrHeight, dblRadius
    Dim arrStartPoint(2), arrEndPoint(2), arrContours, CheckSurface, blnIntersection

    Call Main ()
    Call ExportPoints 'The function for exporting the intersection points to a text file

    Sub Main ()

    numobjects=0
    'the object is selected by the user
    strobjectid=Rhino.GetObject ("Select object", 0, True)
    ReDim Preserve arrobjects(numobjects)
    arrObjects(numobjects) = strobjectid

    numobjects=numobjects+1


    'Get bounding box limits
    If Rhino.IsObject(strobjectid) Then

    arrbox=Rhino.Boundingbox(strobjectid)

    End If

    If IsNull(arrbox) Then
    Call Rhino.Print("Something Went Wrong!")
    Exit Sub
    End If


    'Printing the Boundingbox limits
    For i=0 To UBound(arrBox)

    Rhino.Print(i+1 & ". point of bounding box is:" & Rhino.Pt2Str(arrbox(i), 3))

    Next

    'Getting distances between lines in x,y,z directions
    zstep=Rhino.GetReal("Enter number to be distance between lines in z direction, this distance will be also the radius of the material to be injected:",0.05,0,0.1)
    xstep=Rhino.GetReal("Enter number to be distance between lines in x direction:",0.05,0,0.1) + 2*zstep
    ystep=Rhino.GetReal("Enter number to be distance between lines in y direction:",0.05,0,0.1) + 2*zstep



    arrx=Array(arrbox(0)(0),arrbox(1)(0),arrbox(2)(0),arrbox(3)(0),arrbox(4)(0),arrbox(5)(0),arrbox(6)(0),arrbox(7)(0))
    arry=Array(arrbox(0)(1),arrbox(1)(1),arrbox(2)(1),arrbox(3)(1),arrbox(4)(1),arrbox(5)(1),arrbox(6)(1),arrbox(7)(1))
    arrz=Array(arrbox(0)(2),arrbox(1)(2),arrbox(2)(2),arrbox(3)(2),arrbox(4)(2),arrbox(5)(2),arrbox(6)(2),arrbox(7)(2))

    'Determining min and max values in x,y,z of the bounding box
    xmin = Rhino.Min(arrx)
    xmax = Rhino.Max(arrx)
    ymin = Rhino.Min(arry)
    ymax = Rhino.Max(arry)
    zmin = Rhino.Min(arrz)
    zmax = Rhino.Max(arrz)

    arrPoint(0)= xmin
    arrPoint(1)= ymin
    arrPoint(2)= zmin
    arrsurfacepoints(0)=arrPoint

    arrPoint(0)= xmin
    arrPoint(1)= ymax
    arrPoint(2)= zmin
    arrsurfacepoints(1)=arrPoint

    arrPoint(0)= xmax
    arrPoint(1)= ymax
    arrPoint(2)= zmin
    arrsurfacepoints(2)=arrPoint

    arrPoint(0)= xmax
    arrPoint(1)= ymin
    arrPoint(2)= zmin
    arrsurfacepoints(3)=arrPoint

    CheckSurface=Rhino.AddSrfPt (arrsurfacepoints)

    ReDim Preserve arrobjects(numobjects)
    arrObjects(numobjects) = CheckSurface

    arrStartPoint(0)=(xmax+xmin)/2
    arrStartPoint(1)=(ymax+ymin)/2
    arrStartPoint(2)=zmin

    arrEndPoint(0)=(xmax+xmin)/2
    arrEndPoint(1)=(ymax+ymin)/2
    arrEndPoint(2)=zmax

    arrContours=Rhino.AddSrfContourCrvs (strobjectid, arrStartPoint, arrEndPoint, zstep)

    blnIntersection=Rhino.CurveSurfaceIntersection (arrContours(0), CheckSurface)

    If IsNull (blnIntersection) Then

    Rhino.Print("The Object has a rounded bottom surface")

    Call Rounded() 'The function for polysurfaces with rounded bottom surface (ex. a sphere)

    Else

    Rhino.Print("The Object has a rounded bottom surface")

    Call Cornered() 'The function for polysurfaces with cornered bottom surface (ex. a sphere)

    End If

    End Sub

    Sub Rounded()

    count=0
    ptcount=0
    'drawing the lines on the object
    Rhino.EnableRedraw(False)

    For z=zmin To zmax Step zstep

    If count Mod 2 =0 Then

    For y=ymin To ymax Step ystep

    numobjects=numobjects+1
    strxline=Rhino.AddLine (Array(xmin,y,z),Array(xmax,y,z))


    If count>0 Then
    arrCCX=Rhino.CurveCurveIntersection(strxline, arrContours(count-1))
    End If

    ReDim Preserve arrObjects(numobjects)
    arrObjects (numobjects)=strxline


    If IsArray(arrCCX) Then

    ReDim Preserve arrXpts(ptcount+1)

    If ptcount Mod 2=0 Then

    arrXpts(ptcount)=arrCCX(0,1)

            arrXpts(ptcount+1)=arrCCX(1,1)


    Else

    arrXpts(ptcount)=arrCCX(1,1)
    arrXpts(ptcount+1)=arrCCX(0,1)

    End If
    ptcount=ptcount+2
    End If

    Next


    Else

    For x=xmin To xmax Step xstep

    numobjects=numobjects+1

    stryline=Rhino.AddLine (Array(x,ymin,z),Array(x,ymax,z))
    arrCCX=Rhino.CurveCurveIntersection(stryline, arrContours(count-1))

    ReDim Preserve arrObjects(numobjects)
    arrObjects (numobjects) =strxline


    If IsArray(arrCCX) Then

    ReDim Preserve arrXpts(ptcount+1)

    If ptcount Mod 2=0 Then

    arrXpts(ptcount)=arrCCX(0,1)

            arrXpts(ptcount+1)=arrCCX(1,1)


    Else

    arrXpts(ptcount)=arrCCX(1,1)
    arrXpts(ptcount+1)=arrCCX(0,1)

    End If
    ptcount=ptcount+2

    End If

    Next
    End If
    count=count+1
    Next
    Rhino.EnableRedraw(True)

    If IsArray(arrObjects) Then

    Rhino.DeleteObjects(arrObjects)

    End If

    dblRadius=zstep/2

    Rhino.EnableRedraw(False)

    For i=0 To Ubound(arrXpts)-1 Step 2

    arrBase=arrXpts(i)
    arrHeight=arrXpts(i+1)
    Rhino.AddCylinder arrBase, arrHeight, dblRadius

    Next

    Rhino.Enable Redraw (True)

    End Sub

    Sub Cornered()

    count=0
    ptcount=0
    'drawing the lines on the object


    Rhino.EnableRedraw(False)

    For z=zmin To zmax Step zstep

    If count Mod 2 =0 Then

    For y=ymin To ymax Step ystep

    numobjects=numobjects+1
    strxline=Rhino.AddLine (Array(xmin,y,z),Array(xmax,y,z))

    blnIntersection=Rhino.CurveSurfaceIntersection (arrContours(0), CheckSurface)

    If IsNull (blnIntersection) Then Exit Sub

    arrCCX=Rhino.CurveCurveIntersection(strxline, arrContours(count))

    ReDim Preserve arrObjects(numobjects)
    arrObjects (numobjects)=strxline


    If IsArray(arrCCX) Then

    ReDim Preserve arrXpts(ptcount+1)

    If ptcount Mod 2=0 Then

    arrXpts(ptcount)=arrCCX(0,1)
    arrXpts(ptcount+1)=arrCCX(1,1)

    Else

    arrXpts(ptcount)=arrCCX(1,1)
    arrXpts(ptcount+1)=arrCCX(0,1)

    End If
    ptcount=ptcount+2
    End If

    Next


    Else

    For x=xmin To xmax Step xstep

    numobjects=numobjects+1

    stryline=Rhino.AddLine (Array(x,ymin,z),Array(x,ymax,z))
    arrCCX=Rhino.CurveCurveIntersection(stryline, arrContours(count))

    ReDim Preserve arrObjects(numobjects)
    arrObjects (numobjects) =strxline


    If IsArray(arrCCX) Then

    ReDim Preserve arrXpts(ptcount+1)

    If ptcount Mod 2=0 Then

    arrXpts(ptcount)=arrCCX(0,1)
    arrXpts(ptcount+1)=arrCCX(1,1)

    Else

    arrXpts(ptcount)=arrCCX(1,1)
    arrXpts(ptcount+1)=arrCCX(0,1)

    End If
    ptcount=ptcount+2

    End If

    Next
    End If
    count=count+1
    Next
    Rhino.EnableRedraw(True)

    If IsArray(arrObjects) Then

    Rhino.DeleteObjects(arrObjects)

    End If

    dblRadius=zstep/2

    Rhino.EnableRedraw(False)

    For i=0 To Ubound(arrXpts)-1 Step 2

    arrBase=arrXpts(i)
    arrHeight=arrXpts(i+1)
    Rhino.AddCylinder arrBase, arrHeight, dblRadius

    Next

    Rhino.EnableRedraw(True)




    End Sub

    Sub ExportPoints

    Dim strObject, arrPoints, arrPoint, strPoint

    Dim strFileName, strFilter, objFSO, objStream

    Dim strPreX, strPreY, strPreZ

    Dim strPostX, strPostY, strPostZ

    Dim strDelimiter

    ' User-definable prefixes

    strPreX = ""

    strPreY = ""

    strPreZ = ""

    ' User-definable postfixes

    strPostX = ""

    strPostY = ""

    strPostZ = ""

    ' User-definable delimiter(s)

    strDelimiter = ","

    ' User-definable file filters

    strFilter = "Text File (*.txt)|*.txt|All Files (*.*)|*.*||"

    ' Get the points to export

    If IsNull(arrXpts) Then Exit Sub

    ' Get the filename to create

    strFileName = Rhino.SaveFileName("Save Point Coordinates As", strFilter)

    If IsNull(strFileName) Then Exit Sub

    ' Get the file system object

    Set objFSO = CreateObject("Scripting.FileSystemObject")

    On Error Resume Next

    ' Get a new text file

    Set objStream = objFSO.CreateTextFile(strFileName, True)

    If Err Then

    MsgBox Err.Description

    Exit Sub

    End If

    For Each strObject In arrXpts

    ' Process point clouds

    If Rhino.IsPointCloud(strObject) Then

    arrPoints = Rhino.PointCloudPoints(strObject)

    If IsArray(arrPoints) Then

    For Each arrPoint In ArrPoints

    strPoint = strPreX & CStr(arrPoint(0)) & strPostX & strDelimiter & strPreY & CStr(arrPoint(1)) & strPostY & strDelimiter & strPreZ & CStr(arrPoint(2)) & strPostZ

    ' Write the coordinate to the file

    objStream.WriteLine(strPoint)

    Next

    End If

    ' Process point clouds

    ElseIf Rhino.IsPoint(strObject) Then

    arrPoint = Rhino.PointCoordinates(strObject)

    If IsArray(arrPoint) Then

    strPoint = strPreX & CStr(arrPoint(0)) & strPostX & strDelimiter & strPreY & CStr(arrPoint(1)) & strPostY & strDelimiter & strPreZ & CStr(arrPoint(2)) & strPostZ

    ' Write the coordinate to the file

    objStream.WriteLine(strPoint)

    End If

    End If

    Next

    ' Write the file

    objStream.Close

    End Sub

Recommend

Why are these buttons gray?