I have a .NET app that calls wd_proj_wdp_data LISP API through a result buffer. If the app is called on the command line using the .NET defined command name everything works fine. I would like to the option to start my app by using the LISP command call, (command "commandname").
When I use the LISP command call the result buffer returns null. I don't know why it is returning null.
Why would the LISP command call prevent the result buffer from returning a value?
I am running AutoCAD Electrical 2016 on Windows 7
Hi,
are you using "LispFunction" ? if not, please try using LispFunction,
[LispFunction("MyLispFunction", "MyLispFunctionLocal")] public int MyLispFunction(ResultBuffer args) // This method can have any name { return 1; }
Hi,
I have the same problem whith the following VB.NET app. When i call the command "felixMV3" on the command line everything works fine but when i want start my app by using the LISP command call (command "felixMV3") AUTOCAD crash.
<Autodesk.AutoCAD.Runtime.CommandMethod("felixMV3", "felixMV3", Autodesk.AutoCAD.Runtime.CommandFlags.Modal)>
Public Sub felixMV3()
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim acDoc As Document = Autodesk.AutoCAD.ApplicationServices.Core.Application.DocumentManager.MdiActiveDocument
Dim ReturnBlkvalue As String = Lispfunction("C:ReturnBlk")
End Sub
#End Region
Public Function Lispfunction(varlisp As String) As String
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim arg As New TypedValue(CInt(LispDataType.Text), varlisp)
Dim arginv As New ResultBuffer(arg)
Dim resbuf As ResultBuffer = Application.Invoke(arginv)
Dim values = resbuf.AsArray()
Dim value As String = values(0).Value
Dim blkname As String = value
Return value
End Function
Anyone can help me please?
Félix.
Can't find what you're looking for? Ask the community or share your knowledge.