Author Topic: List of LISP functions which are different in VisualLisp  (Read 1210 times)

0 Members and 1 Guest are viewing this topic.

BrrNisp

  • Mosquito
  • Posts: 8
List of LISP functions which are different in VisualLisp
« on: June 02, 2022, 05:01:53 AM »
Hello,

As a newcomer in the LISP programming world, I discovered the subtle difference between Common LISP and AutoLISP (or VisualLisp I don't really know.. but the LISP used in AutoCAD).

For example, the position function does not exist in VisualLISP (tell me if I am wrong), but the vl-position
function does exist instead, but I am not sure how it works.

And is there a "conversion" table of the function from Common LISP to VisualLISP ?

Regards
« Last Edit: June 02, 2022, 05:40:03 AM by BrrNisp »
AutoCAD 2022

mhupp

  • Bull Frog
  • Posts: 250
Re: List of LISP functions which are different in VisualLisp
« Reply #1 on: June 02, 2022, 10:50:10 AM »
And is there a "conversion" table of the function from Common LISP to VisualLISP ?
https://www.theswamp.org/Sources/doc/avlisp/#vl-position

Not really but John K made a great resource that you can use to look them up.
anything that starts with vl vla vlax vlr is visual lisp that needs (vl-load-com) to run

https://www.theswamp.org/Sources/doc/avlisp/

MrSmith

  • Newt
  • Posts: 23
Re: List of LISP functions which are different in VisualLisp
« Reply #2 on: June 02, 2022, 01:20:13 PM »
While you can usually use the languages interchangeably, there are some caveats. For example, if you are doing objectDB modifications, you can't use Autolisp commands or autocad commands (i.e. ssget or "command"). On the other hand, if you are doing AC Core Console scripts, you can't use VL- functions.

baitang36

  • Bull Frog
  • Posts: 213
Re: List of LISP functions which are different in VisualLisp
« Reply #3 on: June 02, 2022, 06:23:42 PM »
Hello,

As a newcomer in the LISP programming world, I discovered the subtle difference between Common LISP and AutoLISP (or VisualLisp I don't really know.. but the LISP used in AutoCAD).

For example, the position function does not exist in VisualLISP (tell me if I am wrong), but the vl-position
function does exist instead, but I am not sure how it works.

And is there a "conversion" table of the function from Common LISP to VisualLISP ?

Regards
In fact, the position function exists, but it is not exposed. Autodesk is reserved for its own use and is not allowed for ordinary users. Please contact me about the usage of this function. I will give you a method to make it work. You need to load a FAS file

BrrNisp

  • Mosquito
  • Posts: 8
Re: List of LISP functions which are different in VisualLisp
« Reply #4 on: June 03, 2022, 08:27:54 AM »
Not really but John K made a great resource that you can use to look them up.
anything that starts with vl vla vlax vlr is visual lisp that needs (vl-load-com) to run

Thanks a lot! I had found some stuff, but not detailed so this helps a lot.

While you can usually use the languages interchangeably, there are some caveats. For example, if you are doing objectDB modifications, you can't use Autolisp commands or autocad commands (i.e. ssget or "command"). On the other hand, if you are doing AC Core Console scripts, you can't use VL- functions.

What are objectDB and AC Core ? (but I guess I am not at that level for the moment)

In fact, the position function exists, but it is not exposed. Autodesk is reserved for its own use and is not allowed for ordinary users. Please contact me about the usage of this function. I will give you a method to make it work. You need to load a FAS file

Thank you! I will stick to the vl-position for now.
AutoCAD 2022

d2010

  • Bull Frog
  • Posts: 326
Re: List of LISP functions which are different in VisualLisp
« Reply #5 on: June 10, 2022, 06:01:46 AM »
Anyone need, Remix autoLisp+CommonLisp,?
they need develop a librarie/s files with source/both.?
How to emulate AutoLisp14 inside CommonLisp?
Code: [Select]
Subject=AutoLisp for CommonLisp
I put these file/s*.zip  , a tiny demo, how to make a libraries'files. (e.g Java Applets).
Code: [Select]
(define ac_setenv(name value)  ;; Here ac_setenv inside AutoLisp
  (declare (type (or null simple-string) value))
  (if value ;; Here the source is CommnLisp
)
Together, can we extend these file/s*.zip, ??.

« Last Edit: June 10, 2022, 02:30:13 PM by d2010 »