Code Problem

Discussion in 'AutoCAD' started by kgerb, Jan 6, 2004.

  1. kgerb

    kgerb Guest

    This is a little code that makes it easier to draw a line at a specific angle. The problem is that when I enter a value for the angle it tells me "invalid option keyword". Any thoughts?

    (defun c:bossline (/ pt1 len ang)
    (cond
    ((null (setq pt1 (getpoint "\nFirst point: ")))
    nil)
    ((null (setq len (getdist "\nLength: ")))
    nil)
    ((null (setq ang (getangle "\nAngle: ")))
    nil)
    (t
    (command ".line" pt1 (strcat "@" (rtos len) "<" (angtos ang)) "")))
    (princ))

    Thanks a bunch!
     
    kgerb, Jan 6, 2004
    #1
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.