Puzzled

Discussion in 'AutoCAD' started by jo_ar, Aug 10, 2007.

  1. jo_ar

    jo_ar Guest

    Hello All!!!

    I did a routine to do brackets automaticly who I use frequently in my
    drawings, but it functioning sometimes is not correct, principally
    when
    I'm zoom out in drawing...the result is a straight line.
    I really don't know what happens.
    I use ACAD2k and Win XP.
    The routine is:

    (if (not dtr) (load "dtr"))

    (defun c:pared (/ p1 p2 p3 p4 p5 p6 osm)
    (setq osm (getvar "osmode"))
    (setvar "osmode" 1)
    (setvar "orthomode" 0)
    (setq p1 (getpoint "\nFinal Point of Upper Line.")
    p2 (getpoint "\nFinal Point of Lower Line.")
    p3 (polar p1 (dtr 90) 2)
    p4 (polar p2 (dtr 270) 2)
    p5 (polar p1 (dtr 0) 2)
    p6 (polar p2 (dtr 0) 2)
    )
    (command "pline" p3 "w" "0" "" p5 p6 p4 "")
    (setvar "orthomode" 1)
    (setvar "osmode" osm)
    (princ)
    )

    Thanks in advance.
    Joar
     
    jo_ar, Aug 10, 2007
    #1
  2. Sometimes the aperture can mess up routines like this if you are zoomed out
    so far that on point and the next point are both in it. Also errant running
    OSNAPS can create odd results.
     
    Michael Bulatovich, Aug 10, 2007
    #2
  3. jo_ar

    per.corell Guest

    It realy are a few years since I did Lisp but I wonder if this is the
    best way to check dtr ;
    (if (not dtr) (load "dtr"))
    Say dtr is defined, what the line say is --- if true load dtr.--- if
    nil nil; Am I right or just rusty ?
     
    per.corell, Aug 21, 2007
    #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.