Author Topic: AutoLISP routine help!!!! (by collegeCAD)  (Read 41401 times)

0 Members and 1 Guest are viewing this topic.

SMadsen

  • Guest
AutoLISP routine help!!!! (by collegeCAD)
« Reply #60 on: October 02, 2003, 06:59:42 PM »
t-bear, I was just kidding around! Thought you might have just changed the default value. No problem at all .. on the contrary, you tweaked it to the better ('better' always being the users need).

Congrats with the grandson!

t-bear

  • Guest
AutoLISP routine help!!!! (by collegeCAD)
« Reply #61 on: October 02, 2003, 10:06:44 PM »
Daron...
Haven't posted it...thoughtless ol' coot that I am.  Will drop it in here (which one of these %*@#in' forums do I put it in?) in the morning.  Headin' for the house & a bite to eat....long day.

t-bear

  • Guest
AutoLISP routine help!!!! (by collegeCAD)
« Reply #62 on: October 03, 2003, 04:13:57 PM »
OK Daron...Here's what Stig gave me with my mminor changes in bold...I don't want to post it in the "show Me....' section 'cause it ain't mine....
[code]like that, or pick the button when writing a post.[/code];edit by Daron
Code: [Select]
(defun C:ADDLAYERS ()
 ;;Created  10/2/03 by SMadsen on "The Swamp"...thanks Stig.
 ;;
  ;; put whatever color number here
  (makeLayers 5)
)

(defun makeLayers (cnum / cnt ctrl layname laynum laypref zero zeroln)
  (setq ctrl 0)
  (initget 6)
  (cond ((and (numberp cnum) (setq laynum (getint "\nNumber of layers: ")))
         (initget 128 "")
         (setq laypref (cond ((setq laypref (getkword "\nLayer [b]prefix <>: ")) [/b]
                              (setq laypref (strcase laypref)))
                             ("")))
         (setq cnt    1
               zeroln (strlen (strcat laypref (itoa laynum)))
               zero   [b]""[/b]
         )
         (repeat laynum
           (repeat (- zeroln (strlen (strcat laypref (itoa cnt))))
             (setq zero (strcat zero "0"))
           )
           (setq layname (strcat laypref zero (itoa cnt))
                 cnt     (1+ cnt)
                 zero    [b]""[/b]
           )
           (if (entmake (list '(0 . "LAYER")
                              '(100 . "AcDbSymbolTableRecord")
                              '(100 . "AcDbLayerTableRecord")
                              (cons 2 layname)
                              (cons 62 cnum)
                              '(70 . 0)))
             (setq ctrl (1+ ctrl))
           )
         )
        )
  )
  (princ (strcat "\n" (itoa ctrl) " layers created"))
  (princ)
)


BTW....how do you go about posting this code so it comes up like it does....sum muddle-rater Huh?
Oh yah....and quotes?

daron

  • Guest
AutoLISP routine help!!!! (by collegeCAD)
« Reply #63 on: October 03, 2003, 04:33:04 PM »
Okay, thanks. I guess I just didn't see the RRB Default method in there when Stig posted it. I edited your post to look okay. The problem with it now is that you can't make anything bold in a code tag. I also commented on how to put it in a code tag. Quote is the same way, but I'll show you just to let you know. [quote] or [quote="T-Bear"]Place quote here[/quote]. It will look like:
[quote]
Quote
This is a quote with no author.
[/quote]
[quote="T-Bear"]
Quote from: T-Bear
This is a quote with the author.
[/quote]

How's that, you still confused?

t-bear

  • Guest
AutoLISP routine help!!!! (by collegeCAD)
« Reply #64 on: October 04, 2003, 06:23:14 PM »
Thanx Daron!!  I actually think I understand it.  So it's :


Quote from: DARON

paste quote here?


nope...that's not it....Hmmmmmm....Tol'ya I'm dain bramaged!
AHAH!  After three false starts (I forgot the closing /) I got it.  should have remembered that from the web page classes....

collegeCAD

  • Guest
AutoLISP routine help!!!! (by collegeCAD)
« Reply #65 on: October 05, 2003, 07:07:08 PM »
Wow, I didn't realize this thread was still going hehe. I've been posting on my other board a lot more... guess I should pay attention to this one too  I might learn a thing or 50... as I already have.

As for the plagiarism comment a few pages back, I did explain to my teacher that I did get help. I showed him the original code and told him that's where it all started. I enlisted some help to figure out why it wasn't working since I'm a LISP n00b and all.

I then went on to explain that someone showed me a better way of coding it. I didn't understand half the things considering we have met in class only 5 or 6 times. So, to *further* educate myself, I took the liberty of picking apart each line of code until I understood it.

He then basically "quizzed" me on it all in front of the class and I explained, to the best of my ability, what each line meant, what each function did, etc. Hopefully I won't be labeled as "teacher's pet" form all this.

But, I do like the challenge of being expected to turn in more than just mediocre, elementary work. It'll push me harder to learn more than what will be covered in our class. And thanks in advance for being there w/ me through it all to help me along... I appreciate it much.

Anyway, test is tomorrow over all that we have covered so far. I feel fairly confident I'll do well in large part to you guys. I'll keep ya'll posted.

Dent Cermak

  • Guest
AutoLISP routine help!!!! (by collegeCAD)
« Reply #66 on: October 05, 2003, 08:19:06 PM »
It is truely a scary thought that T-Bear is helping to shape the mind of a college student!! I thought they usually had to be female and easily enticed with Snickers bars. (Or was it that they Snickered at him in bars? I forget.) :oops:

t-bear

  • Guest
AutoLISP routine help!!!! (by collegeCAD)
« Reply #67 on: October 05, 2003, 10:45:04 PM »
Yep....#2....just so they don't point & laugh. You haven't been payin' attention....I had nothing to do with CC's "education" here...left that to the heavy-hitters.

collegeCAD

  • Guest
AutoLISP routine help!!!! (by collegeCAD)
« Reply #68 on: October 06, 2003, 03:10:04 PM »
Quote from: Dent Cermak
It is truely a scary thought that T-Bear is helping to shape the mind of a college student!! I thought they usually had to be female and easily enticed with Snickers bars. (Or was it that they Snickered at him in bars? I forget.) :oops:


i'm your new resdent fat guy... i like snickers... but not if it entails what i think he wants out of it....

daron

  • Guest
AutoLISP routine help!!!! (by collegeCAD)
« Reply #69 on: October 06, 2003, 04:03:20 PM »
Quote from: collegeCAD
Wow, I didn't realize this thread was still going hehe. I've been posting on my other board a lot more... guess I should pay attention to this one too  I might learn a thing or 50... as I already have.

Of course this thread is still going. It's what you'd call "thread jacking". It's a lot of fun. What you need to do now is set your home page up to this one. Heh, we have Stig here. Enough said.

Quote from: collegeCAD
But, I do like the challenge of being expected to turn in more than just mediocre, elementary work. It'll push me harder to learn more than what will be covered in our class. And thanks in advance for being there w/ me through it all to help me along... I appreciate it much.
You're welcome.
Quote from: collegeCAD
Anyway, test is tomorrow over all that we have covered so far. I feel fairly confident I'll do well in large part to you guys. I'll keep ya'll posted.

Personally, I find that I retain more by coming in here and giving to others what I've learned... so, come often, take what you need, ask what you like, and give back what you know, even if you think someone else might have a better or more accurate answer.