ready2goriding Posted April 20, 2010 Posted April 20, 2010 I thought that I would throw my latest work out for ideas, suggestions, or outright laughter. Just wanted to make sure that I'm on the right path... Code: (defun c:zz (/ a b ip p1 p2 p3 p4 p5) (initget (+ 1 2 4)) (setq a (getdist "\nOAL:")) (initget (+ 1 2 4)) (setq b (getdist "\nOAH:")) (initget (+ 1 2 4)) (while (setq ip (getpoint "\nInsertion Point:")) (setq p1 (polar ip (dtr 90.0) (/ b 3))) (setq p2 (polar p1 (dtr 0.0) a)) (setq p3 (polar p2 (dtr 270.0) (/ b 3))) (setq p4 (polar p3 (dtr 0.0) (- (/ a 2)))) (setq p5 (polar p4 (dtr 90.0) (* b))) (command "._line" ip "_non" p1 "_non" p2 "_non" p3 ip "") (command "._arc" "_non" p1 "_non" p5 "_non" p2) ) ; end while loop (princ) ) ;end (defun dtr (x) (* pi (/ x 180.0)) ) ;end There will be a lot of studying before I can move forward much more, I fear. Quote
fixo Posted April 20, 2010 Posted April 20, 2010 Hey, looking good for me Keep lisping, mate ~'J'~ Quote
Lee Mac Posted April 20, 2010 Posted April 20, 2010 Nice one A few things to think about: Your last initget statement will only affect the first loop of the while expression. Be careful when dividing by integers, try these at your command line, you will see what I mean: (/ 1 2) (/ 1. 2) (/ 1. 2.) (/ 1 2.) Nice start though - I'm sure you'll advance quickly. Lee Quote
ready2goriding Posted April 20, 2010 Author Posted April 20, 2010 Hey, looking good for meKeep lisping, mate ~'J'~ Good work. You're moving along nicely. Thanks guys, I'll keep trying to get better! Nice one A few things to think about: Your last initget statement will only affect the first loop of the while expression. Be careful when dividing by integers, try these at your command line, you will see what I mean: (/ 1 2) (/ 1. 2) (/ 1. 2.) (/ 1 2.) Nice start though - I'm sure you'll advance quickly. Lee Those are good points to know! Not sure how to guard against them... yet! Thanks, doug Quote
David Bethel Posted April 20, 2010 Posted April 20, 2010 Very good start indeed! Maybe some commenting, formatting and streamlining: (defun c:zz1 (/ a b ip p1 p2 p3 p4 p5) ;;;GET THE OAL Size (initget 7) (setq a (getdist "\nOAL: ")) ;;;GET BTHE OAH Size (initget 7) (setq b (getdist "\nOAH: ")) ;;;FORCE 1 INSERTION POINT (initget 1) ;;;LOOP UNTIL NULL INPUT (while (setq ip (getpoint "\nInsertion Point: ")) (setq p1 (polar ip (* pi 0.5) (/ b 3.)) p2 (polar p1 (* pi 0.0) a) p3 (polar p2 (* pi 1.5) (/ b 3.)) p4 (polar p3 (* pi 0.0) (- (/ a 2.))) p5 (polar p4 (* pi 0.5) (* b))) (command "._LINE" ip "_non" p1 "_non" p2 "_non" p3 ip "" "._ARC" "_non" p1 "_non" p5 "_non" p2)) ; end while loop (princ)) The (* pi 1.5) comes in handy when dealing with 90 and 45 degree calculations I don't quit understand the (* b) call in p5. It returns the value of b Congrats! -David Quote
alanjt Posted April 20, 2010 Posted April 20, 2010 Why is there a (* b) in (polar p4 (* pi 0.5) (* b)))? Quote
lpseifert Posted April 20, 2010 Posted April 20, 2010 You may want to consider setting Osmode=0 near the beginning of the code to avoid needing to use "_non" repeatedly. Be sure to restore it to it's previous value before exiting. Of course if you do it that way, you'll need to learn about error trapping. Quote
ready2goriding Posted April 20, 2010 Author Posted April 20, 2010 Very good start indeed! Maybe some commenting, formatting and streamlining: (defun c:zz1 (/ a b ip p1 p2 p3 p4 p5) ;;;GET THE OAL Size (initget 7) (setq a (getdist "\nOAL: ")) ;;;GET BTHE OAH Size (initget 7) (setq b (getdist "\nOAH: ")) ;;;FORCE 1 INSERTION POINT (initget 1) ;;;LOOP UNTIL NULL INPUT (while (setq ip (getpoint "\nInsertion Point: ")) (setq p1 (polar ip (* pi 0.5) (/ b 3.)) p2 (polar p1 (* pi 0.0) a) p3 (polar p2 (* pi 1.5) (/ b 3.)) p4 (polar p3 (* pi 0.0) (- (/ a 2.))) p5 (polar p4 (* pi 0.5) (* b))) (command "._LINE" ip "_non" p1 "_non" p2 "_non" p3 ip "" "._ARC" "_non" p1 "_non" p5 "_non" p2)) ; end while loop (princ)) The (* pi 1.5) comes in handy when dealing with 90 and 45 degree calculations I don't quit understand the (* b) call in p5. It returns the value of b Congrats! -David Will the (* pi 1.5) approach prevent me from having to write that decimal-to-radians formula continually? Even if it will not, I'm a fan... I tried several times to make "point p5" appear where it was needed. The * (times?) sign worked. That is the best explanation I can give... I have already fallen into a bad habit of not commenting enough. Noone here will understand it anyway- I have to work on that! Thanks for your help! doug Why is there a (* b) in (polar p4 (* pi 0.5) (* b)))? It was an attempt to get the proper height? (as in: "times the OAH") Quote
alanjt Posted April 20, 2010 Posted April 20, 2010 You may want to consider setting Osmode=0 near the beginning of the code to avoid needing to use "_non" repeatedly. Be sure to restore it to it's previous value before exiting. Of course if you do it that way, you'll need to learn about error trapping. A very good thing to know, but I wouldn't really bother with it here. not because he's a n00b :wink: either. Quote
alanjt Posted April 20, 2010 Posted April 20, 2010 It was an attempt to get the prper height? (as in: "times the OAH") But (* b) doesn't do anything. (* 5) = 5 Quote
ready2goriding Posted April 20, 2010 Author Posted April 20, 2010 You may want to consider setting Osmode=0 near the beginning of the code to avoid needing to use "_non" repeatedly. Be sure to restore it to it's previous value before exiting. Of course if you do it that way, you'll need to learn about error trapping. I started reading about error trapping today. Like most lisp things, it's a little over my head right now. I actually used the (setq "oldsnap" (getvar "osmode")) routine in a training tutorial from the AfraLisp site, and it worked well, but after questioning someone about the "_non" funtion, I kind of wanted to use that method before I forgot about it... my memory is aweful! I'll get on that error trapping soon! Thanks, doug Quote
ready2goriding Posted April 20, 2010 Author Posted April 20, 2010 But (* b) doesn't do anything.(* 5) = 5 Good point. I should change that. Now I wonder what I really changed to make it work... Thanks for the reminder, doug Quote
lpseifert Posted April 20, 2010 Posted April 20, 2010 Will the (* pi 1.5) approach prevent me from having to write that decimal-to-radians formula continually? The (* pi 1.5) approach is good for easy numbers of pi (i.e. 45, 90 degrees...). the DTR is almost necessary if you are using odd degrees such as 32.258. But you can get around needing to type it if you add it to your acaddoc.lsp file and just make a call to the function. Be aware that this is only good if you're using the routines by yourself; not so good if you want to distribute them. Quote
ready2goriding Posted April 20, 2010 Author Posted April 20, 2010 The (* pi 1.5) approach is good for easy numbers of pi (i.e. 45, 90 degrees...). the DTR is almost necessary if you are using odd degrees such as 32.258. But you can get around needing to type it if you add it to your acaddoc.lsp file and just make a call to the function. Be aware that this is only good if you're using the routines by yourself; not so good if you want to distribute them. I see. I'm paranoid about forming (more) bad habits, so I guess the DTR is for me. I'll have it memorized soon anyway! I find the "pi routine" is great for writing test programs for my eyes only, and plan to implement it in that way. Cool tricks! I wish that I knew more about this lisp "thing"! Sooner or later... Thanks, doug Quote
Lee Mac Posted April 20, 2010 Posted April 20, 2010 Error Handlers aren't too bad once you get the hang of them - just think about restoring everything back to how it was before you started (as you would at the end of a routine anyway), and shove all that into a function (along with a nice message to let someone know what has happened). There are mixed opinions about whether to declare the *error* function locally, or use a temporary variable, or even bound the *error* symbol to a lambda function - but all are viable providing they are executed correctly. If you need more help in this area, shout. Lee Quote
David Bethel Posted April 21, 2010 Posted April 21, 2010 I have (2) two main templates that I work from: (1) for general routines template.lsp (1) for routines that actually makes a something templatn.lsp Have fun figuring them out! They are fully developed routines. -David TEMPLATn.LSP TEMPLATE.LSP Quote
ready2goriding Posted April 21, 2010 Author Posted April 21, 2010 I have (2) two main templates that I work from: (1) for general routines template.lsp (1) for routines that actually makes a something templatn.lsp Have fun figuring them out! They are fully developed routines. -David Lisp templates. Never even considered such! I tried to read them, but don't understand much. They'll give me some good research material untill I can decipher them. When I get to that point, I'll feel as though I have accomplished something! Thanks, doug Quote
David Bethel Posted April 21, 2010 Posted April 21, 2010 Here's a template that is very generic: [color=#8b4513];=======================================================================[/color] [color=#8b4513]; TemplatG.Lsp Apr 21, 2010[/color] [color=#8b4513]; Generic AutoLISP Template[/color] [color=#8b4513]; AS IS - Public Domain[/color] [color=#8b4513];++++++++++++ Set Modes & Error ++++++++++++++++++++++++++++++++++[/color] [b][color=BLACK]([/color][/b]defun nw_smd [b][color=FUCHSIA]([/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]SetUndo[b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]setq oldlay [b][color=NAVY]([/color][/b]getvar [color=#2f4f4f]"CLAYER"[/color][b][color=NAVY])[/color][/b] olderr *error* *error* [b][color=NAVY]([/color][/b]lambda [b][color=MAROON]([/color][/b]msg[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]while [b][color=GREEN]([/color][/b]> [b][color=BLUE]([/color][/b]getvar [color=#2f4f4f]"CMDACTIVE"[/color][b][color=BLUE])[/color][/b] 0[b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]command[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]and [b][color=GREEN]([/color][/b]/= msg [color=#2f4f4f]"quit / exit abort"[/color][b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]princ [b][color=BLUE]([/color][/b]strcat [color=#2f4f4f]"\nError: *** "[/color] msg [color=#2f4f4f]" *** "[/color][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]and [b][color=GREEN]([/color][/b]= [b][color=BLUE]([/color][/b]logand [b][color=RED]([/color][/b]getvar [color=#2f4f4f]"UNDOCTL"[/color][b][color=RED])[/color][/b] 8[b][color=BLUE])[/color][/b] 8[b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]command [color=#2f4f4f]"_.UNDO"[/color] [color=#2f4f4f]"_END"[/color] [color=#2f4f4f]"_.U"[/color][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]nw_rmd[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b] nw_var '[b][color=NAVY]([/color][/b][b][color=MAROON]([/color][/b][color=#2f4f4f]"CMDECHO"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"MENUECHO"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"MENUCTL"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"MACROTRACE"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"OSMODE"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"SORTENTS"[/color] . 119[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"LUPREC"[/color] . 2[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"MODEMACRO"[/color] . [color=#2f4f4f]"."[/color][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"BLIPMODE"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"EXPERT"[/color] . 5[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"SNAPMODE"[/color] . 1[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"PLINEWID"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"ORTHOMODE"[/color] . 1[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"GRIDMODE"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"ELEVATION"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"THICKNESS"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"FILEDIA"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"FILLMODE"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"SPLFRAME"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"UNITMODE"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"TEXTEVAL"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"ATTDIA"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"AFLAGS"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"ATTREQ"[/color] . 1[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"ATTMODE"[/color] . 1[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"UCSICON"[/color] . 1[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"HIGHLIGHT"[/color] . 1[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"REGENMODE"[/color] . 1[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"COORDS"[/color] . 2[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"DRAGMODE"[/color] . 2[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"DIMZIN"[/color] . 1[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"PDMODE"[/color] . 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"CECOLOR"[/color] . [color=#2f4f4f]"BYLAYER"[/color][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b][color=#2f4f4f]"CELTYPE"[/color] . [color=#2f4f4f]"BYLAYER"[/color][b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]foreach v nw_var [b][color=NAVY]([/color][/b]and [b][color=MAROON]([/color][/b]getvar [b][color=GREEN]([/color][/b]car v[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]setq nw_rst [b][color=GREEN]([/color][/b]cons [b][color=BLUE]([/color][/b]cons [b][color=RED]([/color][/b]car v[b][color=RED])[/color][/b] [b][color=RED]([/color][/b]getvar [b][color=PURPLE]([/color][/b]car v[b][color=PURPLE])[/color][/b][b][color=RED])[/color][/b][b][color=BLUE])[/color][/b] nw_rst[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]setvar [b][color=GREEN]([/color][/b]car v[b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]cdr v[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]princ[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] [color=#8b4513];++++++++++++ Return Modes & Error +++++++++++++++++++++++++++++++[/color] [b][color=BLACK]([/color][/b]defun nw_rmd [b][color=FUCHSIA]([/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]SetLayer oldlay[b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]setq *error* olderr[b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]foreach v nw_rst [b][color=NAVY]([/color][/b]setvar [b][color=MAROON]([/color][/b]car v[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]cdr v[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]command [color=#2f4f4f]"_.UNDO"[/color] [color=#2f4f4f]"_END"[/color][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]prin1[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] [color=#8b4513];++++++++++++ Set And Start An Undo Group ++++++++++++++++++++++++[/color] [b][color=BLACK]([/color][/b]defun SetUndo [b][color=FUCHSIA]([/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]and [b][color=NAVY]([/color][/b]zerop [b][color=MAROON]([/color][/b]getvar [color=#2f4f4f]"UNDOCTL"[/color][b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]command [color=#2f4f4f]"_.UNDO"[/color] [color=#2f4f4f]"_ALL"[/color][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]and [b][color=NAVY]([/color][/b]= [b][color=MAROON]([/color][/b]logand [b][color=GREEN]([/color][/b]getvar [color=#2f4f4f]"UNDOCTL"[/color][b][color=GREEN])[/color][/b] 2[b][color=MAROON])[/color][/b] 2[b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]command [color=#2f4f4f]"_.UNDO"[/color] [color=#2f4f4f]"_CONTROL"[/color] [color=#2f4f4f]"_ALL"[/color][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]and [b][color=NAVY]([/color][/b]= [b][color=MAROON]([/color][/b]logand [b][color=GREEN]([/color][/b]getvar [color=#2f4f4f]"UNDOCTL"[/color][b][color=GREEN])[/color][/b] 8[b][color=MAROON])[/color][/b] 8[b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]command [color=#2f4f4f]"_.UNDO"[/color] [color=#2f4f4f]"_END"[/color][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]command [color=#2f4f4f]"_.UNDO"[/color] [color=#2f4f4f]"_GROUP"[/color][b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] [color=#8b4513];++++++++++++ Make Layer Current +++++++++++++++++++++++++++++++++[/color] [b][color=BLACK]([/color][/b]defun SetLayer [b][color=FUCHSIA]([/color][/b]name / ldef flag[b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]cond [b][color=NAVY]([/color][/b][b][color=MAROON]([/color][/b]or [b][color=GREEN]([/color][/b]not name[b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]not [b][color=BLUE]([/color][/b]snvalid name[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]princ [color=#2f4f4f]"\nBad Aurgment Passed To SetLayer - "[/color][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]prin1 name[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]exit[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]command [color=#2f4f4f]"_.LAYER"[/color][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]if [b][color=NAVY]([/color][/b]not [b][color=MAROON]([/color][/b]tblsearch [color=#2f4f4f]"LAYER"[/color] name[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]command [color=#2f4f4f]"_Make"[/color] name[b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]progn [b][color=MAROON]([/color][/b]setq ldef [b][color=GREEN]([/color][/b]tblsearch [color=#2f4f4f]"LAYER"[/color] name[b][color=GREEN])[/color][/b] flag [b][color=GREEN]([/color][/b]cdr [b][color=BLUE]([/color][/b]assoc 70 ldef[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]and [b][color=GREEN]([/color][/b]= [b][color=BLUE]([/color][/b]logand flag 1[b][color=BLUE])[/color][/b] 1[b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]command [color=#2f4f4f]"_Thaw"[/color] name[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]and [b][color=GREEN]([/color][/b]minusp [b][color=BLUE]([/color][/b]cdr [b][color=RED]([/color][/b]assoc 62 ldef[b][color=RED])[/color][/b][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]command [color=#2f4f4f]"_On"[/color] name[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]and [b][color=GREEN]([/color][/b]= [b][color=BLUE]([/color][/b]logand flag 4[b][color=BLUE])[/color][/b] 4[b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]command [color=#2f4f4f]"_Unlock"[/color] name[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]and [b][color=GREEN]([/color][/b]= [b][color=BLUE]([/color][/b]logand flag 16[b][color=BLUE])[/color][/b] 16[b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]princ [color=#2f4f4f]"\nCannot Set To XRef Dependent Layer"[/color][b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]quit[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]command [color=#2f4f4f]"_Set"[/color] name[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]command [color=#2f4f4f]""[/color][b][color=FUCHSIA])[/color][/b] name[b][color=BLACK])[/color][/b] [color=#8b4513];************ Main Program ***************************************[/color] [b][color=BLACK]([/color][/b]defun nw_ [b][color=FUCHSIA]([/color][/b]/ olderr oldlay nw_var nw_rst[b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]nw_smd[b][color=FUCHSIA])[/color][/b] [color=#8b4513];;;INSERT YOUR CODE HERE[/color] [b][color=FUCHSIA]([/color][/b]nw_rmd[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] [color=#8b4513];************ Load Program ***************************************[/color] [b][color=BLACK]([/color][/b]defun C:Test [b][color=FUCHSIA]([/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]nw_[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] [b][color=BLACK]([/color][/b]if nw_ [b][color=FUCHSIA]([/color][/b]princ [color=#2f4f4f]"\nTest Loaded\n"[/color][b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] [b][color=BLACK]([/color][/b]prin1[b][color=BLACK])[/color][/b] [color=#8b4513];|================== End Program =======================================[/color] Have fun - David Quote
ready2goriding Posted April 21, 2010 Author Posted April 21, 2010 Generic is good! I can make more sense of this, and it will be a huge aid in furthering my studies. It's good to see how things work and are set up. Thank you! doug Quote
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.