.lsp routines not working
Using ACAD 2012, Windows 7, 64-bit
I'm having a little problem...
I have a number of .lsp routines that I have loaded into the startup suite. I have them pathed correctly and at the top of the list in the support file search path under options.
Problem is...they load into the drawing when a drawing is opened, but they will not execute. If I type APPLOAD and re-load them individually, they all seem to work fine.
I'm only having this problem with the computers that are running 2012 in the office
Any help is greatly appreciated
Re: .lsp routines not working
Welcome to AUGI!
I've never been a fan of Startup Suite, personally, instead I use ACADDOC.lsp to AUTOLOAD my routines into each drawing opened.
HTH
Re: .lsp routines not working
Can you attach a copy of an acaddoc.lsp for me to reference?
Thanks.
Mike
Re: .lsp routines not working
Quote:
Originally Posted by
michael.243371
Can you attach a copy of an acaddoc.lsp for me to reference?
No, I cannot. But I can assist you in creating your own, or attempt to answer any questions that you may have.
In short, ACADDOC.lsp is a user defined file that is automagically loaded into every drawing that is opened, provided one resides within the Support File Search Path (SFSP).
This file does not come with AutoCAD, and can be created by any text editor (i.e., Notepad, Notepad++, etc.) where the text file is saved with a .LSP file extension.
If your going to learn LISP though, then I'd instead suggest that you consider usign the Visual LISP Integrated Development Environment (VLIDE) for .LSP file creation.
HTH
1 Attachment(s)
Re: .lsp routines not working
Re: .lsp routines not working
Strictly using the LOAD statement is common when first starting. It's effective, it's simple, and there's loads of room for improvement (pun intended).
For instance, LOADing all routines places each one in memory at drawing open, which not only takes time; but also will proceed to clog up your memory stacks when your code library grows. Then you may typically prefer the advantages of using AUTOLOAD instead; it makes all of your routines available without actually loadin them into memory until the first time the command is invoked.
Another thing, personal preference albeit, is to end each routine with (princ) to prevent unwanted returned values from bein displayed at the command line.
Also consider using a FOREACH statement for loading a list of routines.
Again, nothing wrong with what you have, yet stil room to improve.
HTH