Load a lisp from within another lsp file
Can I load a lsp from within another lsp file just as in AutoCAD
In Acad i used: (load"LayerDirectorV1-1.lsp")
This gives an error in BricsCAD: ; error : LOAD failed: 'LayerDirectorV1-1.lsp'
Does Anybody know if it is possible or what the correct comand would be?
Added: I know the APPLOAD comand but I need it without dialog box
Thanks
In Acad i used: (load"LayerDirectorV1-1.lsp")
This gives an error in BricsCAD: ; error : LOAD failed: 'LayerDirectorV1-1.lsp'
Does Anybody know if it is possible or what the correct comand would be?
Added: I know the APPLOAD comand but I need it without dialog box
Thanks
0
Comments
-
Solved it after some fiddling around:
I need to include the location
(load"J:\\BricsCAD\\Lisp\\Viewportlock.lsp")0 -
Or you could add that "BricsCAD/Lisp" folder to your SRCHPATH setting.
Have you seen the online Lisp help?
Developer Reference > LISP > AutoLISP Standard Functions > L > load
0 -
Yes I did see that but "load lisp.lsp" didn't work in BricsCAD (It did in autoCAD) as mentioned in my original message.
In BricsCAD I need to add the complete location.0 -
Dear C_Wilm,
> Or you could add that "BricsCAD/Lisp" folder to your SRCHPATH setting.
as Anthony mentioned - (load) function can load the Lisp file, if it can find the file :-)
a) either by adding full path specification
or
b) by adding your folder "J:/BricsCAD/Lisp" to SRCHPATH setting
you can test with
(findfile "Viewportlock.lsp")
at commandline, to see if the file can be found ... if so, it can be loaded.
many greetings !0 -
or
c) by opening a .dwg file that's in the same folder as the .lsp file0 -
you can test with
(findfile "Viewportlock.lsp")
at commandline, to see if the file can be found ... if so, it can be loaded.
many greetings !
I know the findfile command but It is a cloud installation and "findfile"does not work if the files are somewhere in our cloud0 -
You can also obtain your loaded source file location with
(vl-list-loaded-lisp)
and extract directory path.0