Search Blog

AutoCAD Exchange

Photos

  • www.flickr.com
    S. Hurley's items Go to S. Hurley's photostream

« Why should I move from AutoCAD LT to AutoCAD 2005 | Main | 2350 Miles by Plane and Car in 4 Days Last Week »

18 August 2004

How to call acedGetPoint from VB.NET.

Tip By Autodesk AutoCAD Developer - Albert Szilvasy

The code:

<StructLayout(LayoutKind.Sequential)> _
Public Structure ads_point
    Public x As Double
    Public
y As Double
    Public
z As Double
End
Structure
<DllImport("acad.exe", CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.Cdecl)> _
Public Shared Function acedGetPoint(<InAttribute(), MarshalAs(UnmanagedType.AsAny)> ByVal start As Object, ByVal prompt As String, ByRef result As ads_point) As Int32
End Function


<CommandMethod("acedGetPoint")> _
Public Sub test()
    Dim pt As New ads_point()
    acedGetPoint(
Nothing, "gimme a point:", pt)
    acedGetPoint(pt, "gimme another one:", pt)
End Sub

 

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341bfd0c53ef00d8353c723269e2

Listed below are links to weblogs that reference How to call acedGetPoint from VB.NET.:

Comments