Author Topic: CUI loading of lisp files  (Read 2714 times)

0 Members and 1 Guest are viewing this topic.

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
CUI loading of lisp files
« on: October 30, 2020, 09:20:01 PM »
Based on what Sinc hints to at the bottom of this years ago I gather that the CUI loads the lisp files by finding them in support paths. Can anyone confirm?

https://cc.bingj.com/cache.aspx?q=path+of+lisp+files+in+cui&d=4989901676940115&mkt=en-US&setlang=en-US&w=GTShMqhrhtndJVYvx1Espm9-SFpwx--0

tombu

  • Bull Frog
  • Posts: 289
  • ByLayer=>Not0
Re: CUI loading of lisp files
« Reply #1 on: November 05, 2020, 12:32:54 PM »
He suggested storing those lisp files where they could be found in the support path which makes loading them easier. That's how most of us store them so paths aren't required. The folder your lisp is stored should also be a Trusted Folder.
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Re: CUI loading of lisp files
« Reply #2 on: November 05, 2020, 01:39:49 PM »
Thanks. I'm trying to understand if the CUI utilizes the "Full Path" for those lisp files in some way, or if it simply finding them in a support path.

PKENEWELL

  • Bull Frog
  • Posts: 320
Re: CUI loading of lisp files
« Reply #3 on: November 05, 2020, 02:58:15 PM »
Forgive me for chiming in, but doesn't a CUI automatically load a lisp file with the same name and an .mnl extension if found? I believe these must be in the support paths.
"When you are asked if you can do a job, tell 'em, 'Certainly I can!' Then get busy and find out how to do it." - Theodore Roosevelt

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Re: CUI loading of lisp files
« Reply #4 on: November 05, 2020, 07:35:01 PM »
Basically trying to wrap my head around this.  The lisp file added to the CUI through the CUI command, then selecting "LISP" and loading it.

If those lisps are moved, but to a location in the support path, will they continue to work when autocad is opened again?

I was trying to see if there was a way to see if the real path was saved in the CUI somehow, but don't need to do that. Thinking about it now, I just need to create a new directory somewhere and add it to the support path, then close cad, move the lisp, then reopen cad and see if it works.

I was under thinking it hehe.

Thanks all!
« Last Edit: November 05, 2020, 07:45:24 PM by nobody »

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Re: CUI loading of lisp files
« Reply #5 on: November 05, 2020, 07:43:24 PM »
Tested it. For anyone in the future who is interested in this it turns out the CUI does somehow store the full path of the files. Moving lisps stored in the CUI this way, even if to a support path, causes them to not load.

Peter2

  • Swamp Rat
  • Posts: 654
Re: CUI loading of lisp files
« Reply #6 on: November 06, 2020, 05:35:56 AM »
...Moving lisps stored in the CUI this way, even if to a support path, causes them to not load.
For me, that's obvious and a standard behaviour.
a) Define only a file - and it is searched everywhere in support paths
b) define it with full path - it is only searched there and nowhere else
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Re: CUI loading of lisp files
« Reply #7 on: November 08, 2020, 07:34:45 AM »
...Moving lisps stored in the CUI this way, even if to a support path, causes them to not load.
For me, that's obvious and a standard behaviour.
a) Define only a file - and it is searched everywhere in support paths
b) define it with full path - it is only searched there and nowhere else

Unfortunate for me you didn't see it sooner to save me the time :)

Peter2

  • Swamp Rat
  • Posts: 654
Re: CUI loading of lisp files
« Reply #8 on: November 08, 2020, 03:25:39 PM »
...
a) Define only a file - and it is searched everywhere in support paths
...
If you mess up your files in your support paths and you have files with same name in different support folders - no matter if they are fonts or programs or something else - you have to check which file is really loaded.
I know the problem that you are checking and modifying and replacing your file in folder A, but Autocad uses the similar file from folder B..
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

BIGAL

  • Swamp Rat
  • Posts: 1434
  • 40 + years of using Autocad
Re: CUI loading of lisp files
« Reply #9 on: November 08, 2020, 11:45:21 PM »
The general rule for support files is start looking at top and once found stop but I only ever had 1 copy of custom menus, yes variations but different names. there is a up down in the support path use it push the user paths to top.
A man who never made a mistake never made anything

tombu

  • Bull Frog
  • Posts: 289
  • ByLayer=>Not0
Re: CUI loading of lisp files
« Reply #10 on: November 09, 2020, 01:50:50 PM »
Tested it. For anyone in the future who is interested in this it turns out the CUI does somehow store the full path of the files. Moving lisps stored in the CUI this way, even if to a support path, causes them to not load.
As putting code into folders both in Support and Trusted Folders is simpler, more secure and easier to fix when network locations are modified I recommend you try this approach to avoid issues in the future. Have you looked into the TRUSTEDPATHS (System Variable)? http://help.autodesk.com/view/ACD/2021/ENU/?guid=GUID-2FB4611D-F141-48D5-9B6E-460EB59351AF
Like Mike.Perry who sinc quoted I've never used Startup Suite either as it's a poor replacement for acad.lsp, acaddoc.lsp, acad.rx, or *.mnl files which can easily be copied to other PC's, verticals and Versions. Google search for "startup suite not loading" returns About 8,580,000 results, first Swamp one: https://www.theswamp.org/index.php?topic=41923.0
Many users have used Startup Suite without issues or at least without noticing any but why take a chance?
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D