jaredmccullough Posted May 29, 2013 Author Share Posted May 29, 2013 I have a few questions: 1.) I created a text file using Notepad Command and pasted the code then tried saving it as a .LSP extension file but could not find this option? 2.) From my understanding of LISP there is a command as part of the code to activate it correct? 3.) Do these have to be activated everytime you open the file or can they be incorporated in the drawing file that when its opened they activate? Quote Link to comment Share on other sites More sharing options...
BlackBox Posted May 29, 2013 Share Posted May 29, 2013 1.) I created a text file using Notepad Command and pasted the code then tried saving it as a .LSP extension file but could not find this option? It's not an option, it's a file extension... In Notepad, or Notepad++ when you save the new file, simply enter the .LSP file extension. That's it. 2.) From my understanding of LISP there is a command as part of the code to activate it correct? Not necessarily, and not in this instance... The code I provided will automagically start the reactor when you load the code. 3.) Do these have to be activated everytime you open the file or can they be incorporated in the drawing file that when its opened they activate? LISP code must be loaded into each drawing opened in order to be available while editing that drawing... The trade-off to this is that the code can be demand loaded, which makes drawing open take less time (as compared to loading all LISP into each drawing at open), and keeps your memory stack clear until a LISP is needed. For this particular situation, we're not concerned with demand-loading, as we're dealing with event-driven code... Which must be loaded at drawing open in order to act when the pre-configured events are raised... For this, I suggest using AcadDoc.lsp Quote Link to comment Share on other sites More sharing options...
jaredmccullough Posted May 30, 2013 Author Share Posted May 30, 2013 ok so I have pasted the 1st code given in a notepad and then saved it as code.lsp which makes it an AutoLISP application source correct? Now your saying all I should need to do is load this code into the drawing file when I need to use it? As well do I need the second code (The .net) one as well or is that just a seperate coding for .net that functions the same? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.