Draw Lines in Sketch
This commit is contained in:
parent
352556ecc9
commit
93470dc486
|
|
@ -28,8 +28,32 @@ Public Class Program
|
|||
boolstatus = Model.Extension.SelectByID2("Front Plane", "PLANE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
Model.ClearSelection2(True)
|
||||
|
||||
Dim skPoint As SketchPoint
|
||||
skPoint = swSkMgr.CreatePoint(1, 0, 0)
|
||||
For Each DR As DataRow In pointTable.Rows
|
||||
Dim skPoint As SketchPoint
|
||||
Dim pX = DR("X")
|
||||
Dim pY = DR("Y")
|
||||
skPoint = swSkMgr.CreatePoint(pX, pY, 0)
|
||||
Next
|
||||
|
||||
For Each DR1 As DataRow In pointTable.Rows
|
||||
Dim skLine As SketchLine
|
||||
Dim rowIndex = pointTable.Rows.IndexOf(DR1)
|
||||
Dim DR2 As DataRow
|
||||
|
||||
Try
|
||||
DR2 = pointTable.Rows(rowIndex + 1)
|
||||
Catch ex As Exception
|
||||
DR2 = pointTable.Rows(0)
|
||||
End Try
|
||||
|
||||
Dim pX1 = DR1("X")
|
||||
Dim pY1 = DR1("Y")
|
||||
Dim pX2 = DR2("X")
|
||||
Dim pY2 = DR2("Y")
|
||||
|
||||
skLine = swSkMgr.CreateLine(pX1, pY1, 0, pX2, pY2, 0)
|
||||
Next
|
||||
|
||||
swSkMgr.InsertSketch(True)
|
||||
End Sub
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue