From: Rich & Dana T.
Subject: can't get it to work
Date: 
Message-ID: <74acjq$3hn@world5.bellatlantic.net>
I can't seem to get this lisp to run in R14....
It appears to load OK but when I try to run it I get    error:null function
Ive had some luck with button macros and this is my first attempt at running
lisp
What am I doing wrong?????
I picked this code up at www.cadalog.com
thanks in advanced for your help
Rich
richdana#bellatlantic.net

;  425 N. ASHE ST.

;  SOUTHERN PINES, NC 28387

;

;  All rights reserved without prejudice.

;

; Copyright: 3-16-96

; Edited:  3-16-96

;

(defun c:clbl (/); line1 line2 pt1 pt2 pt3 pt4

  (c:svlayr)

(while

  (setq nent (nentsel "\nPick contour at point to label"))

  (setq pt0 (nth 1 nent)

        line1 (entget(car nent))

        pt1 (cdr(assoc 10 line1))

        txtht (* 0.125(getvar"dimscale"))

        conti (fix(caddr pt1))

        contz (itoa conti)

        pt2

          (cond

            ((eq "VERTEX"(cdr(assoc 0 line1)))

              (cdr(assoc 10(entget(entnext(cdr(assoc -1 line1)))))))

            ((eq "LINE"(cdr(assoc 0 line1)))

              (cdr(assoc 11 line1)))

          );cond

        txang

          (if

            (and

              (>=(angle pt1 pt2)(* 0.5944 pi))

              (<=(angle pt1 pt2)(* 1.5944 pi))

            );and

            (*(/(angle pt2 pt1)2 pi)360)

            (*(/(angle pt1 pt2)2 pi)360)

          );if

        pt0 (trans(list(car pt0)(cadr pt0))0 1)

        pt1 (trans(list(car pt1)(cadr pt1))0 1)

        pt2 (trans(list(car pt2)(cadr pt2))0 1)

        pt0 (polar pt1 (angle pt1 pt2)(distance pt1 pt0))

        mjrg "C"

        llt "-"

        prod "CONT"

        colr "6"

  );setq

  (cond

    ((eq(rem conti 10)0)

      (setq modf "TX10"))

    ((eq(rem conti 5)0)

      (setq modf "TX05"))

    ((eq(rem conti 2)0)

      (setq modf "TX02"))

    ((setq modf "TX01"))

  );cond

  (c:mklayr)

  (command ".text" "j" "mc" pt0 txtht txang contz)

  (setq cltxt (entget(entlast))

        cltxt (subst

                (cons 51 0.349)

                (assoc 51 cltxt)

                cltxt

              )

  );setq

  (entmod cltxt)

);while

  (c:rslayr)

  (princ)

);defun