Author Topic: Brand Spanking new to AutoLisp!!  (Read 6323 times)

0 Members and 1 Guest are viewing this topic.

brennon

  • Guest
Brand Spanking new to AutoLisp!!
« on: November 11, 2004, 12:18:56 PM »
Hello,

I am brand new to AutoLisp.  :D  So I am sorry if my questions sound dumb to all the experts out there.  I am having trouble getting some Lisp files to load properly.  For example:

TimSpangler wrote a lisp file called creating layers.  I was able to download the file and then load it fine.  But when I go to try and run the program I get errors like the following:

; error no function definition:  :(

I noticed that TimSpangler uses Acad2005, I am using Acad2000 and Acad2004.  Could this be the reason?  Am I not loading it properly?  What do I have to do to the .lyr files that come with the lisp file?  Am I not typing in the wright command to run the program?

I suppose that getting frustrated is all part of the deal when someone is first learning AutoLisp.

If anyone can help me, that would be great!!

Thanks!
Brennon

Edit: MP killed the color so the bear could read it.

M-dub

  • Guest
Brand Spanking new to AutoLisp!!
« Reply #1 on: November 11, 2004, 12:30:25 PM »
Can you post the lisp?
The directory containing your .lyr files likely has to be in your AutoCAD Support paths.
Hope that helps...
Mike

PS - What's with the red text?  :horror:

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Brand Spanking new to AutoLisp!!
« Reply #2 on: November 11, 2004, 01:09:28 PM »
You should be able to run that with LAYER_CREATOR
you need to put all those files in your acad search path. example:
c:\program files\autocad\support\
TheSwamp.org  (serving the CAD community since 2003)

t-bear

  • Guest
Brand Spanking new to AutoLisp!!
« Reply #3 on: November 11, 2004, 01:22:43 PM »
Hey....HEY!!! We'll have no spanking here!!  You get Dent excited and we'll have to sanitize the whole durned forum......

Brennon, could you do me a small favor?  Lose the red text? it's hard on these ol' eyes.  It's OK for emphasis or such, but the whole post gets hard to read.   Sorry to grumble, guy.

PDJ

  • Guest
Brand Spanking new to AutoLisp!!
« Reply #4 on: November 11, 2004, 01:35:47 PM »
Poor little fella, his life will never be the same..

Especially after Dent gets wind of fresh meat..

t-bear

  • Guest
Brand Spanking new to AutoLisp!!
« Reply #5 on: November 11, 2004, 01:46:52 PM »
Yep, Alan, he'll git tough or git ate 'round here LOL
Gator bait!

brennon

  • Guest
Brand Spanking new to AutoLisp!!
« Reply #6 on: November 11, 2004, 01:49:23 PM »
Thanks for the help

I did what you said and put all the files in the support directory for autocad.  I tried to run the command and the window came up but there was nothing under the pulldown box and nothing in the box.  Is there another directory that I need to put the files in?

Thanks
Brennon!

Ps. Sorry about the red text!!   :D

ELOQUINTET

  • Guest
Brand Spanking new to AutoLisp!!
« Reply #7 on: November 11, 2004, 01:53:27 PM »
GO BACK BRENNON, escape while you can :shock:   :lol:

daron

  • Guest
Brand Spanking new to AutoLisp!!
« Reply #8 on: November 11, 2004, 01:54:32 PM »
I assume you're using appload to load all your lisp files and you've typed (vl-load-com) into the beginning of the lisp somewhere? Also, instead of reposting the lisp as was suggested, it'd be better if you could link us to the TSpangler thread where you got it from.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Brand Spanking new to AutoLisp!!
« Reply #9 on: November 11, 2004, 01:58:43 PM »
Ok. try this.
delete all the files that belong to layer creator that you put in the support(?) directory

create a new directory called "layer_creator"
unzip all the files into this dir

start acad
add that dir to the acad support file search

(load "layer creator.lsp")
 enter "layer_creator" on the command line.

does that work?
TheSwamp.org  (serving the CAD community since 2003)

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Brand Spanking new to AutoLisp!!
« Reply #10 on: November 11, 2004, 02:00:10 PM »
this is where you'll find layer_creator

http://theswamp.org/phpBB2/viewtopic.php?t=2414
TheSwamp.org  (serving the CAD community since 2003)

brennon

  • Guest
Brand Spanking new to AutoLisp!!
« Reply #11 on: November 11, 2004, 02:11:49 PM »
I tried what you said and it will work once I get ride of the other Layer_Creator.lsp file that I loaded.  I have one that looks to the correct directory and the other one is looking at the wrong directory.

I know this is a dumb question, but, is there a way to remove a lisp file after it has been loaded?

Thanks!
Brennon

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Brand Spanking new to AutoLisp!!
« Reply #12 on: November 11, 2004, 02:18:08 PM »
No, just close that dwg and re-open it. When you first run layer creator it looks for the dir where the .lyr files are kept. You should get a file dialog box the first time you run it, just click "ok" and all should work.
TheSwamp.org  (serving the CAD community since 2003)

brennon

  • Guest
Brand Spanking new to AutoLisp!!
« Reply #13 on: November 11, 2004, 02:21:42 PM »
I tried that and now I am getting a ...Program Cancelled... error.  Have you ever seen that with .lsp files?

Thanks!!

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Brand Spanking new to AutoLisp!!
« Reply #14 on: November 11, 2004, 02:36:05 PM »
Yes, usually after hit you hit the escape key while running a .lsp routine. Make sure you got rid of all the files that you put in the support(?) dir. close and restart acad. "appload" and browse to the location of the layer creator.lsp file. basically start over from square one.
TheSwamp.org  (serving the CAD community since 2003)

brennon

  • Guest
Brand Spanking new to AutoLisp!!
« Reply #15 on: November 11, 2004, 02:45:13 PM »
Thanks Mark for the Help It works great now.  :D

Thanks!
Brennon

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Brand Spanking new to AutoLisp!!
« Reply #16 on: November 11, 2004, 02:56:01 PM »
Quote from: brennon
Thanks Mark for the Help It works great now.  :D

Thanks!
Brennon

you're welcome. nice program ain't it.
TheSwamp.org  (serving the CAD community since 2003)

brennon

  • Guest
Brand Spanking new to AutoLisp!!
« Reply #17 on: November 11, 2004, 03:35:30 PM »
YAH it is a cool program!!!   :D

Now I just have to convince to people I work with to start using .lsp files  and that is where the real challenge lies!!

Brennon

PDJ

  • Guest
Brand Spanking new to AutoLisp!!
« Reply #18 on: November 11, 2004, 06:15:47 PM »
Oh man have you got your work cut out for you there.. I've tried soooo many times over the years to get people to use lisp routines and I think my success rate is about 3%..  I hope you have better luck..

daron

  • Guest
Brand Spanking new to AutoLisp!!
« Reply #19 on: November 12, 2004, 08:24:17 AM »
The best way I know to get others to use them is to show them how slow the non-lisp way of doing things works, then show them how fast the job goes when they use the new programs. Also, a good way for them to remember them is to create a menu for them. Toolbars are okay, but my personal opinion on them is that, no matter how hard you try to setup the perfect toolbar, some brainiac will move tools from one menu to another and will be bugging you the next time they open cad as to which smiley they're supposed to use. Create a pull-down menu and let them create their own toolbars.