error: bad argument type: 2D/3D point: nil

Discussion in 'AutoCAD' started by coachball8, Mar 24, 2005.

  1. coachball8

    coachball8 Guest

    P1 is established by user selection, then
    (setq locw (getreal "\nEnter location in from lower left corner: "))
    (setq locd (getreal "\nEnter location back from lower left corner: "))
    (setq d6 (* locw 12)) ;convert inches to feet
    (setq d7 (* locd 12)) ;convert inches to feet
    (setq insn(getpoint(polar p1(DTR 0.0)d6))) ;establish point in 'x coord
    (setq sp(getpoint(polar d6(DTR 90.0)d7))) ;establish actual start point
    This returns the error "; error: bad argument type: 2D/3D point: nil".
    Can someone tell me what I'm doing wrong? TIA
     
    coachball8, Mar 24, 2005
    #1
  2. coachball8

    ECCAD Guest

    Do you have the DTR function loaded ?
    If not, just include these:
    ;; Degrees to Radians, Radians to Degrees
    (defun dtr (d) (* pi (/ d 180.0)))
    (defun rtd (r) (* 180.0 (/ r pi)))

    Bob
     
    ECCAD, Mar 24, 2005
    #2
  3. coachball8

    coachball8 Guest

    Yes I do. It's loaded at the start. Thanks for the reply. Does it look like this should work?
     
    coachball8, Mar 24, 2005
    #3
  4. coachball8

    ECCAD Guest

    Look at P1 (2d point, with x,y,z),
    in this line:
    (setq insn(getpoint(polar p1(DTR 0.0)d6)))

    then check d6 in this line:
    (setq sp(getpoint(polar d6(DTR 90.0)d7)))

    Maybe d6 needs to be a (list..
    Hint
    Bob
     
    ECCAD, Mar 24, 2005
    #4
  5. coachball8

    coachball8 Guest

    I think I'm confused.........Do I not need to establish a point in the 0 coord at a given distance of d6, then move in the 90 the distance of d7 to locate my starting point? Thanks again.
     
    coachball8, Mar 24, 2005
    #5
  6. coachball8

    ECCAD Guest

    Well,
    I don't know - depends on what you are trying to do.
    But, you need a (point) not a 'distance' in this line:
    (setq sp(getpoint(polar d6(DTR 90.0)d7)))
    The d6 has (so far) been set to a 'real', not a point.
    You can 'create' the point list like:
    (setq P2 (list d6 d7 0.0))
    Then use P2 like:
    (setq sp(getpoint(polar P2(DTR 90.0)d7)))

    Bob
     
    ECCAD, Mar 24, 2005
    #6
  7. coachball8

    Joe Burke Guest

    Maybe I'm mistaken... but getpoint combined with polar makes no sense on my end.

    Joe Burke
     
    Joe Burke, Mar 24, 2005
    #7
  8. coachball8

    James Allen Guest

    (polar d6(DTR 90.0)d7); <---d6 should be a point
     
    James Allen, Mar 24, 2005
    #8
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.