What about "LispFunction" definition in c# ?

What about "LispFunction" definition in c# ?

erictonneau6438
Explorer Explorer
462 Views
5 Replies
Message 1 of 6

What about "LispFunction" definition in c# ?

erictonneau6438
Explorer
Explorer

Hello everyone,
Does the following feature [LispFunction("function_name")] still exist in AutoCAD 2024 references?

 

Code C#:

/**************************************************************************
[LispFunction("myapp_logon")]
public Object myapp_logon_LispFunction(ResultBuffer rbArgs)
{ ...

 


Has it been replaced by something else?
Thank you all

 

/

0 Likes
463 Views
5 Replies
Replies (5)
Message 2 of 6

_gile
Consultant
Consultant

@erictonneau6438 wrote:

Hello everyone,
Does the following feature [LispFunction("function_name")] still exist in AutoCAD 2024 references?


Yes, it does.

https://help.autodesk.com/view/OARX/2024/ENU/?guid=OARX-ManagedRefGuide-Autodesk_AutoCAD_Runtime_Lis...



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 3 of 6

erictonneau6438
Explorer
Explorer

Thanks a lot !
It seems that the basic "LispFunction" is called now "ListFunctionAttribute", correct ?

0 Likes
Message 4 of 6

erictonneau6438
Explorer
Explorer

This doesn't seem to fit my needs...

0 Likes
Message 5 of 6

erictonneau6438
Explorer
Explorer

ok, in fact the functionality is still there... but I have compilation errors.

https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-3B2760FE-A0DC-4229-AEBE-5CC83290BA95 

I think the problem comes from different versions of the .NET framework.
I have to investigate...
Thanks

0 Likes
Message 6 of 6

_gile
Consultant
Consultant

@erictonneau6438 wrote:

This doesn't seem to fit my needs...


LispFunction (as CommandMethod) is an Attribute defined in the LispFunctionAttribute class (or CommandMethodAttribute class) which derives from the Attribute class.

As far as I know, both LispFunctionAttribute and CommandMethodAttribute are part of the AutoCAD .NET API for as long this API exists.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub