Author Topic: Newbie to world of (Lost in Stupid Parentheses) errr..(List)  (Read 102364 times)

0 Members and 1 Guest are viewing this topic.

amgirard2003

  • Guest
Newbie to world of (Lost in Stupid Parentheses) errr..(List)
« Reply #75 on: November 05, 2003, 02:16:20 PM »
I think i see where you're goin with it... so anything that is set within the function will make that variable local to that variable..

If you have many functions that are dependent on the same variable then make it global so other functions can reference them..

Just to add a note... I had never heard of Autolisp and Visual Lisp till about 6 months ago.. I've been using autocad for 10 yrs now. just shows my ignorance to learning new things when i was younger..

daron

  • Guest
Newbie to world of (Lost in Stupid Parentheses) errr..(List)
« Reply #76 on: November 05, 2003, 02:20:06 PM »
Wow, 10 years and you hadn't heard of lisp. I heard of it as soon as I started learning AutoCAD. I also heard a few people voice their displeasure with programming in general. I for one, find it fascinating.

amgirard2003

  • Guest
Newbie to world of (Lost in Stupid Parentheses) errr..(List)
« Reply #77 on: November 05, 2003, 02:28:56 PM »
Yeah i know tell me about it..
Now i totally regret it never hearing about it.. cause i now have the itch to learn programming.

After seeing what the consultant did i was blown away... amazing what he did with reactors and stuff...

And that's why i'm here... i found a forum that's willing to help...
All othe rforums i've gone too have either ignorant people that tell you to figure it out yourself or people that don't answer to your posts.

I'm glad i found this forum... I've learned more in one day than i have in like weeks of reading the books that i have.

Whatever you feel is next to teach or show me please feel free to begin

nivuahc

  • Guest
Newbie to world of (Lost in Stupid Parentheses) errr..(List)
« Reply #78 on: November 05, 2003, 02:47:46 PM »
I know what you mean!

For me, when I first started using CAD I was given a task to do. Me and another drafter had to insert two columns of terminal blocks on a drawing, numbered sequentially and continued on the next sheet.

In other words, sheet A might have terminal blocks 1 through 200 on it and sheet B had terminal blocks 201 through 400 on it etc...

Our terminal block was a rectangle with a single attribute in the center. We had to insert one, assign the number, insert the next, assign the number and so on.

Using Autocad R9, it took us 8 hours to do 2 sheets a piece. And that's not including drawing the wiring or labels.

I did that for about 2 days and was ready to pull my hair out.

I just knew there had to be a better way.

I asked everyone I knew and someone told me I oughtta look into LISP.

I bought a book (still have it and it's great) and tore into it. It took me the better of 2 weeks to write a routine that cut the time it took to do one drawing to about 2 minutes. Needless to say my boss at the time was very happy. So happy, he let me take advantage of any of my 'down time' to learn whatever I wanted so long as it pertained to my job.

I posted that routine, slightly modified, to the Show Your Stuff forum and you can check it out here

And, as you can see, even after doing this for 13 years... I still have a lot to learn.

amgirard2003

  • Guest
Newbie to world of (Lost in Stupid Parentheses) errr..(List)
« Reply #79 on: November 05, 2003, 02:51:50 PM »
Just wanted to post that i work till about 3:30 so if i don't get back to soon after you post your message i'll either check later on in the night or the following day..

JohnK

  • Administrator
  • Seagull
  • Posts: 10658
Newbie to world of (Lost in Stupid Parentheses) errr..(List)
« Reply #80 on: November 05, 2003, 02:55:08 PM »
Ive started my job in late '99. Ive been lisping for about three years now.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

amgirard2003

  • Guest
Newbie to world of (Lost in Stupid Parentheses) errr..(List)
« Reply #81 on: November 05, 2003, 03:02:51 PM »
So what do you feel is the next thing on the list that i should get a grasp on?

JohnK

  • Administrator
  • Seagull
  • Posts: 10658
Newbie to world of (Lost in Stupid Parentheses) errr..(List)
« Reply #82 on: November 05, 2003, 03:04:42 PM »
Are you all caught up? Do you understand the conditional expressions?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

amgirard2003

  • Guest
Newbie to world of (Lost in Stupid Parentheses) errr..(List)
« Reply #83 on: November 05, 2003, 03:14:35 PM »
I believe i understand the conditional..
Are there other ones that i should be concerned with?

I know this sounds dumb but i think this will kinda help me out quite a bit..

How about some little test as we go along on the different topics?

Give me a problem and i'll try and figure it out on my own and see how i do.. but keep in mind that i'm still learnin..

what are your thoughts?

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Newbie to world of (Lost in Stupid Parentheses) errr..(List)
« Reply #84 on: November 05, 2003, 03:24:03 PM »
Quote
I'm glad i found this forum... I've learned more in one day than i have in like weeks of reading the books that i have.

I think I speek for all of use here, thank you.

And if you don't mind I might quote you. :D
TheSwamp.org  (serving the CAD community since 2003)

nivuahc

  • Guest
Newbie to world of (Lost in Stupid Parentheses) errr..(List)
« Reply #85 on: November 05, 2003, 03:25:34 PM »
here, here

JohnK

  • Administrator
  • Seagull
  • Posts: 10658
Newbie to world of (Lost in Stupid Parentheses) errr..(List)
« Reply #86 on: November 05, 2003, 03:34:15 PM »
Dont worry about the other conditionals yet. (You'll understand them in time.)

A small test:
Create a function called "PutLayer" that accepts an argument of a layer name and sets the current layer. Use the procedure I supplied and a conditional expression.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

nivuahc

  • Guest
Newbie to world of (Lost in Stupid Parentheses) errr..(List)
« Reply #87 on: November 05, 2003, 03:48:00 PM »
A test you say?

How about this:

First, download this drawing (right-click, save as)

This drawing has 6 stick-figure characters from Star Wars in it.

Each character has a name and a layer corresponding to their name.

Some of these characters have a weapon. Their weapons are drawn with polylines and are on the same layer as the character themselves.

So if Luke has a weapon it will be drawn with a polyline and the polyline will be on layer 'Luke'.

Your task, should you choose to accept it, is to write a routine that will determine which characters have weapons and which characters do not.

First, figure out, using LISP, what the characters names are.

Then figure out, using LISP, which characters have weapons.

That should be a good place to start.

M-dub

  • Guest
Newbie to world of (Lost in Stupid Parentheses) errr..(List)
« Reply #88 on: November 05, 2003, 03:51:58 PM »
LMAO!!!  :lol:

nivuahc

  • Guest
Newbie to world of (Lost in Stupid Parentheses) errr..(List)
« Reply #89 on: November 05, 2003, 03:59:59 PM »
Hey, no need to be boring, right? :D

By the way, hang on to this drawing because we can use it for other tests in the future. :)