Author Topic: open a text file  (Read 1484 times)

0 Members and 1 Guest are viewing this topic.

domenicomaria

  • Swamp Rat
  • Posts: 737
open a text file
« on: April 28, 2022, 01:23:02 PM »
is there any way to open with a lisp command, a text file (txt or lsp) with the vlide editor?

JohnK

  • Administrator
  • Seagull
  • Posts: 10669
Re: open a text file
« Reply #1 on: April 28, 2022, 02:46:54 PM »
Isn't the VLIDE gone? -i.e. I thought VSCode was replacing the old VLIDE.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

domenicomaria

  • Swamp Rat
  • Posts: 737
Re: open a text file
« Reply #2 on: April 28, 2022, 03:01:58 PM »
Acad 2020

JohnK

  • Administrator
  • Seagull
  • Posts: 10669
Re: open a text file
« Reply #3 on: April 28, 2022, 03:27:41 PM »
Understood but how much longer will it be around -i.e. how useful would a function like that be (and for how long)?

I have heard in the past it was possible to edit the VLIDE.dsk file (or named something like that) but I've known people to corrupt that file quite often (you have been warned).
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

domenicomaria

  • Swamp Rat
  • Posts: 737
Re: open a text file
« Reply #4 on: April 28, 2022, 03:33:18 PM »
I need this command for internal use only

JohnK

  • Administrator
  • Seagull
  • Posts: 10669
Re: open a text file
« Reply #5 on: April 28, 2022, 03:50:05 PM »
yes, I assumed that was the case BUT if a user/program changes the LISPSYS variable and/or this method will not work for VSCode. But, again, I've heard that you can edit the VLIDE.dsk file (and launch the "vlisp" or "vlide" command) however, you can corrupt your vlide.dsk file quite easily.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

BIGAL

  • Swamp Rat
  • Posts: 1445
  • 40 + years of using Autocad
Re: open a text file
« Reply #6 on: April 28, 2022, 08:19:38 PM »
You can do stuff like use notepad or EDIT to open a file even use Word if you want.

(startapp "notepad.exe" filename)

A man who never made a mistake never made anything

domenicomaria

  • Swamp Rat
  • Posts: 737
Re: open a text file
« Reply #7 on: April 29, 2022, 12:30:04 AM »
the file contains a large list with nested lists ... the VL editor is the best choice ... but I don't know how to modify the VLIDE.dsk file ... I haven't seen how it's done yet ... I have to try ... thanks
« Last Edit: April 29, 2022, 01:23:32 AM by domenicomaria »

domenicomaria

  • Swamp Rat
  • Posts: 737
Re: open a text file
« Reply #8 on: April 29, 2022, 01:34:32 PM »
does anyone know a way
to FORMAT the TEXT of a LSP file
in NOTEPAD ++,
in a similar way
to what can be done in VLIDE?

JohnK

  • Administrator
  • Seagull
  • Posts: 10669
Re: open a text file
« Reply #9 on: April 29, 2022, 02:22:46 PM »
I dont know Notepad++ (I'm sure it must have a built in "indenter" of some sort--which just indents the code not reFORMATS it) but I know in VSCode you can reformat a document with Shift+Alt+F or format a selection with Ctrl+k Ctrl+F.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

domenicomaria

  • Swamp Rat
  • Posts: 737
Re: open a text file
« Reply #10 on: April 29, 2022, 02:43:32 PM »
I always use VLIDE and I always format the text with CTRL + SHIFT + F (if I'm not mistaken) ... my problem is to be able, with a LISP command, to open and manage a LISP file ... in an editor ... but I can't open (with a LISP command) the file in VLIDE ... but with NOTEPAD ++, it is possible ... (startapp ...

JohnK

  • Administrator
  • Seagull
  • Posts: 10669
Re: open a text file
« Reply #11 on: April 29, 2022, 03:50:30 PM »
I understand completely but you will probably not get what you want unless you switch to a different editor (like VSCode, for example) or edit the VLIDE.dsk file (I understand your resistance to change but that may be your only option, sorry). I do not believe Notepad++ has the ability to "REFORMAT" code (it most likely has the ability to "INDENT" code but that is different then 'REFORMAT'). VSCode is the new Lisp IDE I would recommend at least trying it; it will have command line arguments so you can use "STARTAPP..." as well.

The VLIDE is very, very old and never was that good to begin with. I say give something else a try if you are just beating your head against a wall for a solution. I had posted a good batch script to help you get set up with using VSCode to really cut down on your initial transition problems (like learning and creating JSON files, and etc.).
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

domenicomaria

  • Swamp Rat
  • Posts: 737
Re: open a text file
« Reply #12 on: April 29, 2022, 10:03:45 PM »
ok

Thanks for all the advice

i think i have to try this VSCode

Because this is the future, now,
and "command line arguments" is interesting

Ciao

7titans

  • Mosquito
  • Posts: 2