Author Topic: AutoCAD 2023 does not load the Lisps entered in the Startup Suite  (Read 3940 times)

0 Members and 1 Guest are viewing this topic.

Lupo76

  • Bull Frog
  • Posts: 343
Hi,
I'm testing the new AutoCAD 2023 for porting my applications.
It seems that something has changed or that there is a bug.
In fact, if I insert a LISP (eg test.lsp) in the Startup Suite of the APPLOAD command, this is not automatically executed during the startup of AutoCAD 2023.
I tried to add the folder path among the trusted paths and check the SECURELOAD variable, but all to no avail :cry:

The same procedure works correctly with previous versions of AutoCAD.

Do you also have this problem?
Is there any solution?

Thanks!

JohnK

  • Administrator
  • Seagull
  • Posts: 10659
Re: AutoCAD 2023 does not load the Lisps entered in the Startup Suite
« Reply #1 on: April 08, 2022, 12:50:25 PM »
You used to be able to use a file called "acaddoc.lsp" to load your files. Not sure if that's still a possibility but it might be worth a shot. I used to do this back in the AutoCAD 200X days with something like:
Code - Auto/Visual Lisp: [Select]
  1. (
  2.  ;; This will try to load a list of files  
  3.  ;; and report that they were or were not loaded.
  4.  ;;
  5.  ;; Written by: JohnK
  6.  ;;             Nov-27-2006
  7.  (lambda ( x / find-file x)
  8.    (defun find-file (f)
  9.      (if (findfile f)
  10.        (progn
  11.          (load f)
  12.          (princ (strcat "\n;;\t\t " f " loaded")) )
  13.        (princ (strcat "\n;;----->\t  ERROR: " f " not found"))) )
  14.    (princ "\n\n;; Begin load programs...")
  15.    (mapcar 'find-file x)
  16.    (princ "\n;: End load programs.")
  17.    (princ)
  18.    )
  19.  '("lisp1.lsp" "lisp2.lsp" "lisp3.lsp" "lisp4.lsp"
  20.    "lisp5.lsp" "lisp6.lsp" "lisp7.lsp"
  21.    )
  22.  )
  23.  
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

BIGAL

  • Swamp Rat
  • Posts: 1433
  • 40 + years of using Autocad
Re: AutoCAD 2023 does not load the Lisps entered in the Startup Suite
« Reply #2 on: April 08, 2022, 11:30:21 PM »
Its a little out there but you could make a "Bundle" that has the option of load lisps on start up.

This is part of a bundle "PackageContents.xml"
<ComponentEntry LoadOnAutoCADStartup="True" LoadOnAppearance="True" ModuleName="./Contents/Resources/Utilities.cuix" AppName="Name of Menu to Load"/>
<ComponentEntry LoadOnAutoCADStartup="True" ModuleName="./Contents/Programs/Goto-layout.lsp" AppName="Lisp File to Load"/>
<ComponentEntry LoadOnAutoCADStartup="True" ModuleName="./Contents/Programs/Multi GETVALS.lsp" AppName="Lisp File to Load"/>
A man who never made a mistake never made anything

Lupo76

  • Bull Frog
  • Posts: 343
Re: AutoCAD 2023 does not load the Lisps entered in the Startup Suite
« Reply #3 on: April 10, 2022, 02:29:00 AM »
Hi you both,
I have already created an installation package that automatically adds a lisp to be loaded into the Startup Suite of the APPLOAD command.
This has always worked in previous versions of AutoCA for at least 10 years.

I can try to implement the solutions you suggested but this involves an important review of the installation package :-(
Before doing this I look for confirmation: do you also have the same problem?

If you add a lisp in the Startup Suite of the APPLOAD command, does it start? or are you encountering the same bug in AutoCAD 2023?

Thanks.

ronjonp

  • Needs a day job
  • Posts: 7531
Re: AutoCAD 2023 does not load the Lisps entered in the Startup Suite
« Reply #4 on: April 10, 2022, 03:37:20 PM »
I don't use the startup suite. I use an MNL with a custom CUI to load my code and it works fine in vanilla AutoCAD 2023.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2149
  • class keyThumper<T>:ILazy<T>
Re: AutoCAD 2023 does not load the Lisps entered in the Startup Suite
« Reply #5 on: April 10, 2022, 06:30:45 PM »
^^ ditto
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.

Lupo76

  • Bull Frog
  • Posts: 343
Re: AutoCAD 2023 does not load the Lisps entered in the Startup Suite
« Reply #6 on: April 11, 2022, 03:52:52 AM »
I don't use the startup suite. I use an MNL with a custom CUI to load my code and it works fine in vanilla AutoCAD 2023.

This works, however in my case I have created an installation package that by modifying the windows registry adds a lisp to be loaded into the Startup Suite
This lisp will then start automatically when AutoCAD starts and will add the application search paths, other lisp to load, load CUI files, etc.
Changing this approach means reviewing the installation package and I sincerely would like to avoid it :tickedoff:

Lupo76

  • Bull Frog
  • Posts: 343
Re: AutoCAD 2023 does not load the Lisps entered in the Startup Suite
« Reply #7 on: April 11, 2022, 03:53:53 AM »
^^ ditto

Hi,
sorry my english is not very good.
What do you mean?
In your case, does the Start Suite work correctly in AutoCAD 2023?

57gmc

  • Bull Frog
  • Posts: 367
Re: AutoCAD 2023 does not load the Lisps entered in the Startup Suite
« Reply #8 on: April 11, 2022, 10:42:43 AM »
^^ ditto

Hi,
sorry my english is not very good.
What do you mean?
In your case, does the Start Suite work correctly in AutoCAD 2023?
Ditto means "copy", which in this, case means "same as above"

57gmc

  • Bull Frog
  • Posts: 367
Re: AutoCAD 2023 does not load the Lisps entered in the Startup Suite
« Reply #9 on: April 11, 2022, 11:34:06 AM »
In fact, if I insert a LISP (eg test.lsp) in the Startup Suite of the APPLOAD command, this is not automatically executed during the startup of AutoCAD 2023.
I installed MEP 2023 to test and it worked for me. I created a lisp with only one line: (princ "This lisp loaded from Startup Suite")

Could there be a problem with the lisp? Startup Suite is just responsible for loading the lisp. You may also need to update the Trusted Folders key with your registry code to include the folder where your lisp is installed.

Lupo76

  • Bull Frog
  • Posts: 343
Re: AutoCAD 2023 does not load the Lisps entered in the Startup Suite
« Reply #10 on: April 11, 2022, 11:51:05 AM »
In fact, if I insert a LISP (eg test.lsp) in the Startup Suite of the APPLOAD command, this is not automatically executed during the startup of AutoCAD 2023.
I installed MEP 2023 to test and it worked for me. I created a lisp with only one line: (princ "This lisp loaded from Startup Suite")

Could there be a problem with the lisp? Startup Suite is just responsible for loading the lisp. You may also need to update the Trusted Folders key with your registry code to include the folder where your lisp is installed.

Already done but unfortunately it doesn't work :-(
I tried the same thing on another pc with AutoCAD 2023 and it works fine, so it seems like a problem limited to one pc.
However on the internet I have seen other similar reports from other users but none with a solution.  :|

Lupo76

  • Bull Frog
  • Posts: 343
Re: AutoCAD 2023 does not load the Lisps entered in the Startup Suite
« Reply #11 on: April 11, 2022, 11:52:58 AM »
I don't use the startup suite. I use an MNL with a custom CUI to load my code and it works fine in vanilla AutoCAD 2023.

This assumes that the user manually uploads the CUI file.
I am looking for a solution that installs my application application using an EXE file, so the first time the user starts AutoCAD they will find my application too.

Lupo76

  • Bull Frog
  • Posts: 343
Re: AutoCAD 2023 does not load the Lisps entered in the Startup Suite
« Reply #12 on: April 11, 2022, 11:53:40 AM »
Its a little out there but you could make a "Bundle" that has the option of load lisps on start up.

This is part of a bundle "PackageContents.xml"
<ComponentEntry LoadOnAutoCADStartup="True" LoadOnAppearance="True" ModuleName="./Contents/Resources/Utilities.cuix" AppName="Name of Menu to Load"/>
<ComponentEntry LoadOnAutoCADStartup="True" ModuleName="./Contents/Programs/Goto-layout.lsp" AppName="Lisp File to Load"/>
<ComponentEntry LoadOnAutoCADStartup="True" ModuleName="./Contents/Programs/Multi GETVALS.lsp" AppName="Lisp File to Load"/>

It might work but I'm looking for full documentation to be able to implement this.

57gmc

  • Bull Frog
  • Posts: 367
Re: AutoCAD 2023 does not load the Lisps entered in the Startup Suite
« Reply #13 on: April 11, 2022, 12:13:58 PM »
I don't use the startup suite. I use an MNL with a custom CUI to load my code and it works fine in vanilla AutoCAD 2023.

This assumes that the user manually uploads the CUI file.
I am looking for a solution that installs my application application using an EXE file, so the first time the user starts AutoCAD they will find my application too.
For that, I use .Net with the Autorun set in the registry. It loads my menu. The bundle can be set to autoload using it's options, but I don't use a bundle because I'm just doing this in house. Therefore I just set the registry for the dll. Below is the sample registry code from a reg file.

[HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AutoCAD\R24.0\ACAD-4102\Applications\TID_Startup]
"DESCRIPTION"="Loads TID customizations at startup for AutoCAD"
"LOADCTRLS"=dword:00000002
"MANAGED"=dword:00000001
"LOADER"="C:\\AcadCustom\\Support_GS\\TID_Startup.dll"
« Last Edit: April 11, 2022, 12:19:18 PM by 57gmc »

Lupo76

  • Bull Frog
  • Posts: 343
Re: AutoCAD 2023 does not load the Lisps entered in the Startup Suite
« Reply #14 on: April 11, 2022, 12:54:36 PM »
For that, I use .Net with the Autorun set in the registry. It loads my menu. The bundle can be set to autoload using it's options, but I don't use a bundle because I'm just doing this in house. Therefore I just set the registry for the dll. Below is the sample registry code from a reg file.

[HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AutoCAD\R24.0\ACAD-4102\Applications\TID_Startup]
"DESCRIPTION"="Loads TID customizations at startup for AutoCAD"
"LOADCTRLS"=dword:00000002
"MANAGED"=dword:00000001
"LOADER"="C:\\AcadCustom\\Support_GS\\TID_Startup.dll"

Seems to work partially ....
I made the following lisp:

Code: [Select]
(defun c:TEST ()
  (alert "TEST")
)
(c:TEST)

When I start AutoCAD the security prompt appears to confirm the start of the .lsp file, however when I open a file the c:TEST function is not present  :embarrassed: