Author Topic: error message with the TA.lsp routine  (Read 2054 times)

0 Members and 1 Guest are viewing this topic.

brennon

  • Guest
error message with the TA.lsp routine
« on: February 14, 2005, 01:34:00 PM »
Hello,

I am getting an error message with the TA.lsp routine and my hope is that someone knows the fix.  The error is as follows.

After typing TA at the command line an error of: Your pointing device can not be used as a tablet comes back.  :(

When I loaded the routine it loaded fine, no errors came back.

Has anyone ever seen this error before?

Brennon

SPDCad

  • Bull Frog
  • Posts: 453
error message with the TA.lsp routine
« Reply #1 on: February 14, 2005, 02:19:44 PM »
If you can, could you post the TA.lsp code.
That may help us find the error and fix it, that is if a solution is not already known.
AutoCAD 2010, w/ OpenDCL

visit: http://reachme.at/spd_designs

brennon

  • Guest
error message with the TA.lsp routine
« Reply #2 on: February 15, 2005, 10:50:03 AM »
Here is the TA.lsp routine that I got from the swamp.  I believe that it was created by R.K. McSwain.

It looks like a great routine and it will suit my needs well once I get it to work for me.

Thanks!
Brennon


TA.LSP
Version
3.0
-
01
MAR
1998
;;;
;;;    Copyright 1998 by R.K. McSwain
;;;
;;;    Permission to use, copy, modify, and distribute this software
;;;    for any purpose and without fee is hereby granted, provided
;;;    that the above copyright notice appears in all copies and
;;;    that both that copyright notice and the limited warranty and
;;;    restricted rights notice below appear in all supporting
;;;    documentation.
;;;
;;;    R.K. McSwain provides this program "AS IS" and with all faults.
;;;    R.K. McSwain specifically disclaims any implied warranty of
;;;    merchantability or fitness for a particular use.  autodesk, inc.
;;;    does not warrant that the operation of the program will be
;;;    uninterrupted or error free.

;;;    This program will match text angle to a line angle selected
;;;--------------------------------------------------------------------
(defun c:textalign (/      ang1     ang2    bob   enttyp enttyp2
          getit  l1     nang    oang   oangprt         p1
          p2      sl     st    time   time2  tx1    wait
          wait2  why     x1    x2
         )

  (setvar "cmdecho" 1)

               ;finds the angle of the line
  (setq wait "T")
  (while wait
    (setq time "T")
    (while time
      (setq sl (entsel "\n Pick Angle To Match:"))
      (if (/= sl nil)
   (setq time nil)
      )
    )
    (setq l1 (entget (car sl)))
    (setq enttyp (cdr (assoc 0 l1)))
    (if   (= enttyp "LINE")
      (setq wait nil)
    )
  )
  (setq p1 (cdr (assoc 10 l1)))
  (setq x1 (car p1))
  (setq p2 (cdr (assoc 11 l1)))
  (setq x2 (car p2))

  (setq why (angle p1 p2))
  (if (>= why 0)
    (setq ang1 why)
  )
  (if (> why 1.5708)         ;same as 90°
    (setq ang1 (+ 3.14159 why))      ;add 180°
  )
  (if (>= why 4.71413)         ;same as 270.1°
    (setq ang1 why)
  )

               ;finds angle of txt
  (setq wait2 "T")
  (while wait2
    (setq time2 "T")
    (while time2
      (setq st (entsel "\n Pick Text To Change:"))
      (if (/= st nil)
   (setq time2 nil)
      )
    )
    (setq tx1 (entget (car st)))
    (setq enttyp2 (cdr (assoc 0 tx1)))
    (if   (= enttyp2 "TEXT")
      (setq wait2 nil)
    )
  )
  (setq ang2 (cdr (assoc 50 tx1)))
  (setq oang (cons 50 ang2))
  (setq nang (cons 50 ang1))
  (setq tx1 (subst nang oang tx1))
  (entmod tx1)
  (terpri)
  (setq bob "T")
  (while bob
    (initget 6 "M m")
    (setq
      getit (getkword "\n Press M to rotate 180° or <ENTER> to quit ")
    )
    (if   (or (= getit "m") (= getit "M"))
      (progn
   (setq oang (assoc 50 tx1))
   (setq oangprt (cdr oang))
   (setq nang (cons 50 (+ 3.14159 oangprt)))
   (setq tx1 (subst nang oang tx1))
   (entmod tx1)
      )
      (setq bob nil)
    )
  )

  (setvar "cmdecho" 0)
  (princ)
)

Gliderider

  • Guest
error message with the TA.lsp routine
« Reply #3 on: February 15, 2005, 11:17:25 AM »
Try typing TEXTALIGN at the command line after loading TA.lsp

Big G

  • Bull Frog
  • Posts: 415
error message with the TA.lsp routine
« Reply #4 on: February 15, 2005, 11:22:06 AM »
Quote from: Gliderider
Try typing TEXTALIGN at the command line after loading TA.lsp


or change your acad.pgp PROVIDING YOU DONT USE YOUR TABLET!!
I thought i seen the light at the end of the tunnel. But it was just someone with a torch bringing me more work.
"You have to accept that somedays youre the pigeon and  somedays youre the statue"

Big G

  • Bull Frog
  • Posts: 415
error message with the TA.lsp routine
« Reply #5 on: February 15, 2005, 11:24:53 AM »
OK who's going to change it to use mtext as well and pick a pl as your reference line??
I thought i seen the light at the end of the tunnel. But it was just someone with a torch bringing me more work.
"You have to accept that somedays youre the pigeon and  somedays youre the statue"

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.