> rb.Add(New TypedValue(5005, (pt.X.ToString + ("," + pt.Y.ToString))))
Consider using the right group code and the
native type (Point3d in this case), instead of
converting the point to string input.
That sort of practice is necessary in VBA or
VB6 when calling SendCommand(), but it is
not needed, and shouldn't be used when
you're calling acedCmd in .NET.
So, instead of the above, you can just do this:
rb.Add( New TypedValue(5009, pt) )
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com
wrote in message news:5578612@discussion.autodesk.com...
try this to get your boundary
Private Declare Function acedCmd Lib "acad.exe" Alias "acedCmd" (ByVal vlist As System.IntPtr) As Integer
Public Sub HatchBoundary(ByVal pt As Point2d)
Dim rb As ResultBuffer = New ResultBuffer
Try
rb.Add(New TypedValue(5005, "._-BOUNDARY"))
rb.Add(New TypedValue(5005, "_AD"))
rb.Add(New TypedValue(5005, "_IS"))
rb.Add(New TypedValue(5005, "_Y"))
rb.Add(New TypedValue(5005, "_OB"))
rb.Add(New TypedValue(5005, "PO"))
rb.Add(New TypedValue(5005, ""))
rb.Add(New TypedValue(5005, (pt.X.ToString + ("," + pt.Y.ToString))))
rb.Add(New TypedValue(5005, ""))
acedCmd(rb.UnmanagedObject)
Catch ex As System.Exception
MsgBox("Hatch Boundary Error " & ex.Message)
Finally
rb.Dispose()
End Try
End Sub
then you can get your lastentity
pat