Jump to content

VB to toggle viewports with layers


jaredmccullough

Recommended Posts

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?

Link to comment
Share on other sites

  • Replies 22
  • Created
  • Last Reply

Top Posters In This Topic

  • jaredmccullough

    12

  • BlackBox

    11

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...