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
    1. Advertising

  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
    1. Advertising

  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


    > 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
     
    Joe Burke, Mar 24, 2005
    #7
  8. coachball8

    James Allen Guest

    (polar d6(DTR 90.0)d7); <---d6 should be a point
    --
    James Allen, EIT
    Malicoat-Winslow Engineers, P.C.
    Columbia, MO


    "coachball8" <> wrote in message
    news:...
    > 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
     
    James Allen, Mar 24, 2005
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. pi
    Replies:
    1
    Views:
    571
    R.K. McSwain
    Jul 19, 2003
  2. LoveCad
    Replies:
    0
    Views:
    184
    LoveCad
    Aug 4, 2003
  3. wkiernan
    Replies:
    9
    Views:
    137
    Tom Smith
    Feb 13, 2004
  4. Adesu

    error: bad argument value

    Adesu, May 25, 2004, in forum: AutoCAD
    Replies:
    4
    Views:
    258
    Adesu
    May 26, 2004
  5. todbarrett
    Replies:
    3
    Views:
    401
    T.Willey
    Feb 10, 2005
Loading...

Share This Page