Author Topic: AutoLISP Editor in 2024  (Read 2993 times)

0 Members and 1 Guest are viewing this topic.

JohnK

  • Administrator
  • Seagull
  • Posts: 10648
Re: AutoLISP Editor in 2024
« Reply #15 on: February 27, 2024, 01:09:53 PM »
By-the-way. Here were my notes on starting to use VSCode for AutoLisp which includes a simple batch script that creates directories and stuff.
https://www.theswamp.org/index.php?topic=55696.msg598040#msg598040
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

57gmc

  • Bull Frog
  • Posts: 366
Re: AutoLISP Editor in 2024
« Reply #16 on: February 27, 2024, 01:34:33 PM »
hmm. I'll have to see if I can find your batch. I seem to remember reading when you posted it some time ago.

keithsCADservices

  • Newt
  • Posts: 45
Re: AutoLISP Editor in 2024
« Reply #17 on: February 27, 2024, 02:13:09 PM »
I know that there is a way to make VS Code recognize an active session of AutoCAD. But I need to stress that 99% of the time I don't want my debugger to launch a new ACAD session. That's one of the biggest reasons I'm faster in AutoLISP than C#. Yes there is "hot reload" (Visual Studio full) but it's kind of funny that these features so widely touted in recent years in all their glory offer slightly less utility compared to features we've been using for years.

I've spent around the same amount of time fumbling with VS Code as I have with VLIDE. That alone is a bit of a deal breaker given that I've written about 0.001% of my AutoLISP code in VS Code. I wouldn't be opposed to all of this manual configuration if there was actually some benefit for it. Even in the best case scenario it takes hours to sort out (that feels strange to me).

And now the big kicker: VS Code doesn't work with AutoCAD LT... well I mean it works with anything, but the functionality is greatly reduced. And using it with AutoCAD clones? Good luck!

JohnK

  • Administrator
  • Seagull
  • Posts: 10648
Re: AutoLISP Editor in 2024
« Reply #18 on: February 27, 2024, 03:00:00 PM »
I dont know what `manual configuration` you are talking about. You can just open VSCode, start a new file, save that file as a lisp, then hit <F5> to start debugging. What configuration do you do?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2140
  • class keyThumper<T>:ILazy<T>
Re: AutoLISP Editor in 2024
« Reply #19 on: February 27, 2024, 03:15:15 PM »
Instead of 'fumbling' :

Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

keithsCADservices

  • Newt
  • Posts: 45
Re: AutoLISP Editor in 2024
« Reply #20 on: February 27, 2024, 09:04:52 PM »
I dont know what `manual configuration` you are talking about. You can just open VSCode, start a new file, save that file as a lisp, then hit <F5> to start debugging. What configuration do you do?

Once you get to step 3:

https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-7BE00235-5D40-4789-9E34-D57685E83875

Then this:

https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-A7CC8D30-D74E-418A-9F03-51878E512163

Which includes "In the launch.json editor window, make the following changes..."

And now onto Debugging (note that at this point I'm already at 10x the amount of time it took to learn VLIDE):

https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-09B4C574-F9FB-4F97-8728-5EAB64E13595

Once major issue with debugging in VS Code is that you aren't as connected to AutoCAD as you are with VLIDE. In VLIDE I can run one line of code at a time (or a statement). I can also inspect elements. I can dump object... etc...

I know for a lot of stuff you can copy and paste into ACAD's command line. But VLIDE's console is just better (I like having the option to do both).

After I finally got VS Code working I realized that all the effort was basically just to have a slightly worse option compared to VLIDE, except with intellisense. Is it hard to set up? Well... yes and no. Truth be told I didn't even spend a second "reading up on" how to use VLIDE. I learnt as I went. And improved my knowledge as needed as I got into more and more advanced code. Imagine someone just starting out with AutoLISP and before ever even getting started, they have to f'k around with json files? The help documentations is also far more verbose compared to anything required to get someone up and running with VLIDE. So relatively, it takes exponentially more effort to set up compared to VLIDE. I find the docs also aren't as well written as documentation on VLIDE; mainly because 3rd parties have created guides for VLIDE, but we only have Autodesk's take on how to setup VS CODE.





JohnK

  • Administrator
  • Seagull
  • Posts: 10648
Re: AutoLISP Editor in 2024
« Reply #21 on: February 27, 2024, 09:49:41 PM »
Slow down! You're not reading.

Step #3 (read it again):
Quote
...>%
Note: Previously, the AutoCAD Debug Attach and AutoCAD Debug Launch configurations were defined and stored in a launch.json file contained within the working folder.
So that means you do not "NEED" the JSON files.

On to the second link:
If you look at your extension version they added an entry to just put a path to AutoCAD in there and have the "attach/launch" feature work instead of the JSON files. -i.e. Same as above; you do not "NEED" the JSON files. But you can use them for other things besides "attach/launch".

Last link:
Yep, same as the VLIDE. You can run, breakpoint, etc.. So that's nothing new.


I create the JSON files when I use VSCode because I prefer to have the option to do what I want when I want. I automate stuff.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Lastknownuser

  • Newt
  • Posts: 28
Re: AutoLISP Editor in 2024
« Reply #22 on: February 29, 2024, 03:27:52 AM »
I really wanted to move onto VS Code, but VLIDE seems much more practical

The biggest issue for me is, and I tried searching for answer but didnt find it maybe someone here knows how to do it, is there a way to like in VLIDE choose by double click everything in closed brackets? I know about Select To Bracket command, but Alt+Shift+right is not practical combination and also you have be be inside brackets... I want double click on the outside of bracket like in VLIDE. If this can be done in VS Code I'll start exploring it more

EnM4st3r

  • Mosquito
  • Posts: 2
Re: AutoLISP Editor in 2024
« Reply #23 on: February 29, 2024, 04:09:35 AM »
I have been using AutoLisp for around 8 months now, and i also do not understand why most people keep using VLIDE, i have to admit i have never used VLIDE much but VScode feels much more smooth for me.

keithsCADservices

  • Newt
  • Posts: 45
Re: AutoLISP Editor in 2024
« Reply #24 on: February 29, 2024, 01:46:11 PM »
My plan is to explore Notepad++. I would rather invest my time in that if I have to spend time on something. I am also eventually switching to AutoCAD LT or another CAD program. The "other" CAD's I've tried have similar/worse issues with VS Code... just poorly document procedures and in one case the thing didn't even work. I did get ZWCAD's to work. GstarCAD's was broken and they didn't even care.

Quote
Slow down! You're not reading.

Oh believe me... I've read it... and more than once. The last time I read it I read the documentation that they copied and pasted into the AutoCAD LT help (many of VS Code's features are disabled in ACAD LT). I probably also first read the help either before the update, or they left an old tutorial up (which they're known to do). There is still some manual setup involved. Not a lot but more than VLIDE. I don't mind investing time into something like this if there's a clear benefit.
The last time I set up VS CODE it would have been for ZWCAD or GstarCAD, which at the time, they still required the JSON files. Better than nothing I guess has neither of those programs has its own Visual LISP editor.

As I burn money using AutoCAD Full just for VLIDE I'm actively thinking about what I can and cannot live without. I keep seeing more and more reasons I need to stick with VLIDE. Use whatever "feels" best for sure. I just wish "upgrades" were decisive upgrades and not "gain this lose that" type affairs; we are paying ludicrous subscription fees after all.

JohnK

  • Administrator
  • Seagull
  • Posts: 10648
Re: AutoLISP Editor in 2024
« Reply #25 on: February 29, 2024, 02:26:01 PM »
If you are reading, then what was all the complaining about JSON files about? ...honestly, never mind.

I'm sure Notepad++ will work just fine for you. I hear good things about it. I think I remember there was an AutoLisp syntax file posted here (by MP) but you'd have to search for it. Good luck.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

57gmc

  • Bull Frog
  • Posts: 366
Re: AutoLISP Editor in 2024
« Reply #26 on: February 29, 2024, 03:25:29 PM »
I was just playing around with vscode and the Intellisense is a great feature. Just hover over a lisp function and it shows a bunch of help. You also don't need the json file. You create a lisp project and then you add lisp files to the project. They don't even have to be in the same folder as the prj file. The project stores the full path to the lisp file. So it can be in the deployment folder.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2140
  • class keyThumper<T>:ILazy<T>
Re: AutoLISP Editor in 2024
« Reply #27 on: February 29, 2024, 04:55:05 PM »

If vsCode plugin had a 'evaluateSelection' option I'd probably never open VLIDE  :-)

feel free to add requests
https://github.com/Autodesk-AutoCAD/AutoLispExt/issues/232
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

Lonnie

  • Newt
  • Posts: 177
Re: AutoLISP Editor in 2024
« Reply #28 on: February 29, 2024, 05:04:09 PM »
If you are reading, then what was all the complaining about JSON files about? ...honestly, never mind.

I'm sure Notepad++ will work just fine for you. I hear good things about it. I think I remember there was an AutoLisp syntax file posted here (by MP) but you'd have to search for it. Good luck.

here?
https://nedcad.nl/tools/

BIGAL

  • Swamp Rat
  • Posts: 1417
  • 40 + years of using Autocad
Re: AutoLISP Editor in 2024
« Reply #29 on: February 29, 2024, 07:41:33 PM »
Interesting in that link is the words "is targeted towards more skilled LISP coders" so I use it every day but I started with version 1.4 of Autocad, yeah look up the date of issue. I tried to install VS and it failed so gave up. I occasionally use VLIDE and Blade when  I get real stuck.

The most common problem is mis matched brackets or a bracket in the wrong place Notepad++ is really useful for this. I always check 1st and last as most obvious problem, often defuns are not closed.
A man who never made a mistake never made anything