Hello everyone, I need some help with this lisp. What this lisp does is it prompts you to select an arc... then using an existing block with the arc number, delta, length, tangent, and radius labels as an attribute...it fills in the label of the attribute. The problem that I am having is that it's not placing the info in its proper label slot. It puts the tangent info in the length label and the radius in the arc number label...etc. I have been trying to solve this issue, but no luck. Can anyone help? (DEFUN C:CT () (SETVAR "CMDECHO" 0) (IF (= Tsize NIL) (SETQ tsize (GETREAL "TEXT HEIGHT: "))) (IF (= PRECISION NIL) (SETQ PRECISION (GETINT "PRECISION: "))) (IF (= CRVLBLNUM NIL) (SETQ CRVLBLNUM (GETINT "STARTING CURVE LABEL NUMBER: "))) (COMMAND "OSNAP" "NONE") (setq X (entsel "SELECT ARC: ")) (SETQ PI 3.14159265) (SETQ 2PI (* 3.14159265 2)) (WHILE (/= X NIL) (setq has (car X)) (setq ent (entget has)) (setq RAD (cdr (assoc 40 ent))) (SETQ CEN (CDR (ASSOC 10 ENT))) (SETQ BEGANG (CDR (ASSOC 50 ENT))) (SETQ ENDANG (CDR (ASSOC 51 ENT))) (SETQ BEGANGSTR (ANGTOS BEGANG 1 4)) (SETQ ENDANGSTR (ANGTOS ENDANG 1 4)) (SETQ BEGANG (ANGTOF BEGANGSTR 4)) (SETQ ENDANG (ANGTOF ENDANGSTR 4)) (SETQ BEGPT (POLAR CEN BEGANG RAD) ) (SETQ ENDPT (POLAR CEN ENDANG RAD) ) (SETQ DELTA (ABS (- BEGANG ENDANG))) (IF (> BEGANG ENDANG) (SETQ DELTA (- 2PI DELTA))) ;================================================= ; (PRINT DELTA) (SETQ DUMMYSTRING (ANGTOS DELTA 1 4)) (SETQ DELTA (ANGTOF DUMMYSTRING 1)) (PRINT DELTA) ;================================================= (SETQ DELTADEC (/ (* DELTA 180) PI)) (PRINT DELTA) (SETQ DEGRE (FIX DELTADEC)) (SETQ DEGREDEC (- DELTADEC DEGRE)) (SETQ MINUTE (FIX (* DEGREDEC 60))) (SETQ MINUTEDEC (- (* DEGREDEC 60) MINUTE)) (SETQ SECOND (* MINUTEDEC 60)) (IF (< MINUTE 10) (SETQ MINU (STRCAT "0" (ITOA MINUTE))) (SETQ MINU (ITOA MINUTE))) (IF (< SECOND 10) (SETQ SECO (STRCAT "0" (RTOS SECOND 2 0))) (SETQ SECO (RTOS SECOND 2 0))) (SETQ DLTTA (STRCAT (ITOA DEGRE) "%%d" MINU "'" SECO "''")) (SETQ RADUS (STRCAT (RTOS RAD 2 PRECISION) "'")) (SETQ CLEN (* (/ PI 180) DELTADEC RAD)) (SETQ LNGTH (STRCAT (RTOS CLEN 2 PRECISION) "'")) (SETQ TANGNT "-") (IF (<= DELTA PI) (PROGN (SETQ CTAN (* RAD (/ (SIN (/ DELTA 2)) (COS (/ DELTA 2))))) (PRINT CTAN) (SETQ CTAN (ABS CTAN)) (SETQ TANGNT (STRCAT (RTOS CTAN 2 PRECISION) "'")) )) (PRINT DLTTA) (PRINT RADUS) (PRINT LNGTH) (SETQ ZZZ (STRCAT "CURVE LABEL NUMBER: " (RTOS CRVLBLNUM 2 0))) (SETQ CLBL (GETINT ZZZ)) (IF (/= CLBL NIL) (SETQ CRVLBLNUM CLBL)) (setq p1 begpt) (setq p2 endpt) (SETQ X1 (CAR P1)) (SETQ Y1 (CAR (CDR P1))) (SETQ X2 (CAR P2)) (SETQ Y2 (CAR (CDR P2))) (SETQ X1ST (RTOS X1 2 10)) (SETQ Y1ST (RTOS Y1 2 10)) (SETQ X2ST (RTOS X2 2 10)) (SETQ Y2ST (RTOS Y2 2 10)) (SETQ DX (- X2 X1)) (SETQ DY (- Y2 Y1)) (SETQ PT (LIST (/ (+ X1 X2) 2) (/ (+ Y1 Y2) 2))) (SETQ LEN (DISTANCE P1 P2)) (SETQ LENSTR (STRCAT (RTOS LEN 2 PRECISION) "'")) (PRINT LENSTR) (SETQ ANG (ATAN DY DX)) (IF (= (ABS ANG) (/ PI 2)) (SETQ TEXTANG (ABS ANG)) ) (IF (< (ABS ANG) (/ PI 2)) (SETQ TEXTANG ANG)) (IF (> (ABS ANG) (/ PI 2)) (SETQ TEXTANG (+ ANG PI))) (SETQ ANGSTR (ANGTOS (ATAN DY DX) 4 4)) (SETQ TEXTANGSTR (ANGTOS TEXTANG 4 4)) (SETQ PT2STR (STRCAT ANGSTR " " LENSTR)) (COMMAND "INSERT" "CRVLBL" PT TSIZE TSIZE TEXTANGSTR CRVLBLNUM DLTTA RADUS LNGTH TANGNT) (SETQ CRVLBLNUM (+ CRVLBLNUM 1)) (setq X (entsel "Pick ARC: ")) ; (SETQ INS1 (GETPOINT "STARTING POINT : ")) ; (SETQ INS2 (GETPOINT INS1 "ROTATION : ")) ; (if (= ins2 nil) (setq ins2 0)) ; (COMMAND "INSERT" "CRVLBL" INS1 TSIZE TSIZE INS2 CRVLBLNUM DLTTA RADUS LNGTH TANGNT) ; (SETQ CRVLBLNUM (+ CRVLBLNUM 1)) ; (setq X (entsel "Pick ARC: ")) ) )