humberto
2007-06-03, 08:26 AM
I need some translation help from vba to c#
to craeate boundary
Dim Pt As Variant, _
pstr As String, _
Msg As String
Private Sub test()
With ThisDrawing
Msg = vbCrLf & "Select an Internal Point"
Do
On Error Resume Next
Pt = .Utility.GetPoint(, Msg)
If Err Then
Err.Clear
Exit Do
End If
On Error GoTo 0
pstr = Replace(CStr(Pt(0)), ",", ".") & "," & _
Replace(CStr(Pt(1)), ",", ".")
.SendCommand Chr(3) & Chr(3) & "._-boundary" & vbCr & pstr & vbCr & vbCr
Set LastObj = .ModelSpace.Item(.ModelSpace.Count - 1)
If TypeOf LastObj Is AcadLWPolyline Then
Set objLWPolyline(0) = LastObj
End If
Loop
On Error GoTo 0
End With
MsgBox "Done"
End Sub
to craeate boundary
Dim Pt As Variant, _
pstr As String, _
Msg As String
Private Sub test()
With ThisDrawing
Msg = vbCrLf & "Select an Internal Point"
Do
On Error Resume Next
Pt = .Utility.GetPoint(, Msg)
If Err Then
Err.Clear
Exit Do
End If
On Error GoTo 0
pstr = Replace(CStr(Pt(0)), ",", ".") & "," & _
Replace(CStr(Pt(1)), ",", ".")
.SendCommand Chr(3) & Chr(3) & "._-boundary" & vbCr & pstr & vbCr & vbCr
Set LastObj = .ModelSpace.Item(.ModelSpace.Count - 1)
If TypeOf LastObj Is AcadLWPolyline Then
Set objLWPolyline(0) = LastObj
End If
Loop
On Error GoTo 0
End With
MsgBox "Done"
End Sub