Code Red > AutoLISP (Vanilla / Visual)

Cui - LISP Load Question

(1/5) > >>

MSTG007:
I have this routine loaded within a CUI under LISP Files.
If a routine is accidently not there, the file will not load any of the routines below.
How can I get keep loading even when a file is not there?


--- Code: ---(defun C:cui_Loader()
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\85x11_L.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\85x11_P.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\11X17_L.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\11X17_P.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\22X34_L.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\22X34_P.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\24X36_L.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\24X36_P.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\30X42_L.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\30X42_P.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\36X48_L.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\36X48_P.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\1-10.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\1-20.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\1-30.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\1-40.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\1-50.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\1-60.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\1-80.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\1-100.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\1-200.lsp")
(load "\\\\Server1\\Autodesk\\CUI\\Ribbon\\1-500.lsp")
(princ))
(C:cui_Loader)

--- End code ---

Thanks for any help :)

gile:
You can create a .MNL fil with the same name as your CUIX file (e.g. Foo.cuix, Foo.mnl) in which you just paste the (load ...) expressions.
The MNL file will be loaded and executes when the CUIX file is loaded.

ChrisCarlson:
Instead of loading via lisp, use the built-in loader within the CUIx utility

MSTG007:
So basically load each lisp in the loader and not an overall loading file. I can try that.

tombu:
Many threads on many forums dedicated to options for loading lisp. First thing would be to keep all your lisp in folders in the Support File Search Path to avoid ever having to include paths like that.
Having a large number of lisp loading every time you open a drawing you may not need seems unnecessary.
You seem to have 10 lisp listed for setting scale.  Why not use one lisp with an argument like
--- Code: ---(defun scale1to (x / temp)…
--- End code ---
where
--- Code: ---(scale1to 50)
--- End code ---
would replace the macro for 1-50.
Consider using the lisp function autoload or just have it autoload in the macro like:
--- Code: ---(or (scale1to)(load "scale1to.lsp")) (scale1to 50)
--- End code ---
which would load the lisp if it wasn't already loaded and then set the scale to 1:50. This is how 90% of mine are loaded. 

Navigation

[0] Message Index

[#] Next page

Go to full version