You are on the right track. See below two example commands for extracting the isolines (curve object) from an AutoCAD surface.
I created a rectangle and then converted that rectangle to a plane surface using the PlaneSurf command.
Using the following two commands (U & V) you can extract an isoline by inputting a value. A value of zero is the midpoint of the plane surface. Inputting a positive number goes in one direction while inputting a negative number goes in the other direction. The value inputted is a unit distance from the mid-point, at least in the example of a plane surface.
I hope this helps get you going in the right direction.
<CommandMethod("AcSurfExtractU")>
Public Sub CmdAcSurfExtractU()
Dim aDoc As Document = Application.DocumentManager.MdiActiveDocument
Dim db As Database = aDoc.Database
Dim ed As Editor = aDoc.Editor
Dim opt As New PromptEntityOptions(vbCrLf & "Select AutoCAD Surface: ")
opt.SetRejectMessage(vbCrLf & "Selected entity must be a AutoCAD Surface. Try again.")
opt.AddAllowedClass(GetType(Autodesk.AutoCAD.DatabaseServices.Surface), False)
Dim res As PromptEntityResult = ed.GetEntity(opt)
If res.Status <> PromptStatus.OK Then Exit Sub
Using tr As Transaction = db.TransactionManager.StartTransaction
Dim surf As Autodesk.AutoCAD.DatabaseServices.Surface = tr.GetObject(res.ObjectId, OpenMode.ForRead)
Dim nurbs As Autodesk.AutoCAD.DatabaseServices.NurbSurface() = surf.ConvertToNurbSurface
If Not nurbs.Length > 0 Then
Exit Sub
End If
Dim nurb As Autodesk.AutoCAD.DatabaseServices.NurbSurface = nurbs(0)
Dim U_dblOpt As New PromptDoubleOptions(vbCrLf & "Enter U Value: ")
Dim U_dblRes As PromptDoubleResult = ed.GetDouble(U_dblOpt)
If U_dblRes.Status <> PromptStatus.OK Then
Exit Sub
End If
Dim blkTblRec As BlockTableRecord = tr.GetObject(db.CurrentSpaceId, OpenMode.ForWrite)
Dim curves As Curve() = nurb.GetIsolineAtU(U_dblRes.Value)
For Each crv As Curve In curves
blkTblRec.AppendEntity(crv)
tr.AddNewlyCreatedDBObject(crv, True)
Next
tr.Commit()
End Using
End Sub
<CommandMethod("AcSurfExtractV")>
Public Sub CmdAcSurfExtractV()
Dim aDoc As Document = Application.DocumentManager.MdiActiveDocument
Dim db As Database = aDoc.Database
Dim ed As Editor = aDoc.Editor
Dim opt As New PromptEntityOptions(vbCrLf & "Select AutoCAD Surface: ")
opt.SetRejectMessage(vbCrLf & "Selected entity must be a AutoCAD Surface. Try again.")
opt.AddAllowedClass(GetType(Autodesk.AutoCAD.DatabaseServices.Surface), False)
Dim res As PromptEntityResult = ed.GetEntity(opt)
If res.Status <> PromptStatus.OK Then Exit Sub
Using tr As Transaction = db.TransactionManager.StartTransaction
Dim surf As Autodesk.AutoCAD.DatabaseServices.Surface = tr.GetObject(res.ObjectId, OpenMode.ForRead)
Dim nurbs As Autodesk.AutoCAD.DatabaseServices.NurbSurface() = surf.ConvertToNurbSurface
If Not nurbs.Length > 0 Then
Exit Sub
End If
Dim nurb As Autodesk.AutoCAD.DatabaseServices.NurbSurface = nurbs(0)
Dim V_dblOpt As New PromptDoubleOptions(vbCrLf & "Enter V Value: ")
Dim V_dblRes As PromptDoubleResult = ed.GetDouble(V_dblOpt)
If V_dblRes.Status <> PromptStatus.OK Then
Exit Sub
End If
Dim blkTblRec As BlockTableRecord = tr.GetObject(db.CurrentSpaceId, OpenMode.ForWrite)
Dim curves As Curve() = nurb.GetIsolineAtV(V_dblRes.Value)
For Each crv As Curve In curves
blkTblRec.AppendEntity(crv)
tr.AddNewlyCreatedDBObject(crv, True)
Next
tr.Commit()
End Using
End Sub