R14 lisp not working in 2004

Discussion in 'AutoCAD' started by Jeff_Clausen, Jul 24, 2003.

  1. Jeff_Clausen

    Jeff_Clausen Guest

    I was using the following curve text lisp in R14. It does not function properly in 2004. All of my other routines work fine.
    (DEFUN CCWTXT ()
        (IF (> STOP STRT)
           (SETQ TANG (- STOP STRT))
           (SETQ TANG (- (* 2 PI) (ABS (- STOP STRT)))))
        (NUMCHAR)
        (SETQ ANG (/ (ABS TANG) (- DL 1))
              CNT 1
              TX (SUBSTR D 1 1)
              SLOPE (/ (+ STRT (/ PI 2)) 0.0174533)
              P (POLAR A STRT R))
        (REPEAT DL
           (COMMAND "text" "m" P H SLOPE TX)
           (SETQ STRT (+ STRT ANG)
                 P (POLAR A STRT R)
                 CNT (+ CNT 1)
                 TX (SUBSTR D CNT 1)
                 SLOPE (/ (+ STRT (/ PI 2)) 0.0174533)))
       (PRINC))

    (DEFUN CWTXT ()
       (IF (> STRT STOP)
          (SETQ TANG (- STRT STOP))
          (SETQ TANG (- (* 2 PI) (ABS (- STRT STOP)))))
       (NUMCHAR)
       (SETQ ANG (/ (ABS TANG) (- DL 1))
             CNT 1
             TX (SUBSTR D 1 1)
             SLOPE (/ (- STRT (/ PI 2)) 0.0174533)
             P B)
       (REPEAT DL
          (COMMAND "text" "m" P H SLOPE TX)
          (SETQ STRT (- STRT ANG)
                P (POLAR A STRT R)
                CNT (+ CNT 1)
                TX (SUBSTR D CNT 1)
                SLOPE (/ (- STRT (/ PI 2)) 0.0174533)))
       (PRINC))

    (DEFUN NUMCHAR ()
       (SETQ CARC (* (* 2 PI R) (/ (ABS TANG) (* PI 2)))
             QTY (FIX (/ CARC (* H 0.92))))
       (IF (< QTY 1) (SETQ QTY 1))
       (PROMPT "\n Arc will accommodate approx ")
       (PROMPT (ITOA QTY))
       (PROMPT "characters ")
       (PROMPT (RTOS H 2 3))
       (PROMPT "high, w/normal spacing.")
       (SETQ D (GETSTRING T "\n Enter text... ")
              DL (STRLEN D))
        (IF (= DL 1) (SETQ DL 2)))

    (DEFUN C:CURTXT ()
        (SETVAR "cmdecho" 0)
        (PROMPT "\n>>>> Function To Place Text Along A Curve <<<< ")
        (SETQ A (GETPOINT "\n Pick Radial Point of Text ")
              B (GETPOINT "\n Pick Middle of First Text Character ")
              C (GETPOINT "\n Pick middle of Last Text Character ")
              H (GETDIST "\n Enter Text Height..... ")
              R (DISTANCE A B)
              STRT (ANGLE A B)
              STOP (ANGLE A C))
        (PROMPT "\n Characters may be written in either direction on a curve. ")
        (INITGET 1 "CW CCW")
        (SETQ Z (GETKWORD "\nType <CW> for Clockwise or <CCW> for Cntrclockwise: "))
        (COND
           ((= Z "CW")(CWTXT))
           ((= Z "CCW")(CCWTXT)))
    (PRINC))

    Thanks
     
    Jeff_Clausen, Jul 24, 2003
    #1
  2. Good catch Luis. Jeff, your description of the "problem" leaves a bit to be
    desired... kind of like telling the mechanic that there is a knocking
    somewhere in the car.

    ;-)

    BTW, the routine worked fine in TuFer on a blank drawing.


    --
    R. Robert Bell, MCSE
    www.AcadX.com


    "Luis Esquivel" <www.draftteam.com> wrote in message
    | turn off your object osnaps... and do another test...
    |
    |
     
    R. Robert Bell, Jul 24, 2003
    #2
  3. Insane jealousy... I had knee surgery, so golf is out for a while.

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    "Luis Esquivel" <www.draftteam.com> wrote in message
    | Thanks, been hitting out of the hole latetly - I will spent the whole
    | weeking in the driving range...
    |
    | | > Good catch Luis. Jeff, your description of the "problem" leaves a bit to
    | be
    | > desired... kind of like telling the mechanic that there is a knocking
    | > somewhere in the car.
    | >
    | > ;-)
    | >
    | > BTW, the routine worked fine in TuFer on a blank drawing.
    | >
    | >
    | > --
    | > R. Robert Bell, MCSE
    | > www.AcadX.com
    | >
    | >
    | > "Luis Esquivel" <www.draftteam.com> wrote in message
    | > | > | turn off your object osnaps... and do another test...
    | > |
    | > |
    | >
    | >
    |
    |
     
    R. Robert Bell, Jul 24, 2003
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.