how do i find this point?

Discussion in 'AutoCAD' started by Court Myers, Jul 6, 2004.

  1. Court Myers

    Court Myers Guest

    OK im working on a lisp where the user selects two points and a polyline is
    drawn between the two points and a block is inserted at the end... the
    polyline just touches the block (a circle)..

    here is the code

    (setq ext1 (getpoint "\nSpecify the first point:")
    ext2 (getpoint ext1 "\nSpecify the end point:")
    ext3 (polar ext1 (angle ext1 ext2) (* (scale01) 0.25)))
    (command ".pline" ext1 ext3 "")
    ".insert" block01 ext3 scale01 "" "")

    can you please help

    Court
     
    Court Myers, Jul 6, 2004
    #1
  2. At a quick glance -- try removing the second-to-last right-parenthesis. As
    it stands, your insert command isn't inside a (command) function.

    I also wonder whether you really mean to draw the Pline from ext1 to ext2,
    rather than to ext3.

    Kent Cooper, AIA


    ...
     
    Kent Cooper, AIA, Jul 6, 2004
    #2
  3. Court Myers

    ECCAD Guest

    Change:
    (command ".pline" ext1 ext3 "")
    ".insert" block01 ext3 scale01 "" "")
    To:
    (command ".pline" ext1 ext3 "")
    (command ".insert" block01 ext3 scale01 "" "")

    Bob
     
    ECCAD, Jul 6, 2004
    #3
  4. Court Myers

    Court Myers Guest

    Thanks Guys I got it to work here is the code

    (setq ext1 (getpoint "\nSpecify the first point:")
    ext2 (getpoint ext1 "\nSpecify the end point:")
    ext3 (polar ext2 (angle ext1 ext2) (* scale01 0.2656250)))
    (command ".pline" ext1 ext2 "")
    (command ".insert" block01 ext3 scale01 "" "")

    Thanks again
    Court Myers
     
    Court Myers, Jul 6, 2004
    #4
  5. Court Myers

    ECCAD Guest

    Correction:
    (command ".insert" "block01" ext3 scale01 "" "")
    .. double quotes around the blockname, and it has to
    be on a 'support' path..

    Bob
     
    ECCAD, Jul 6, 2004
    #5
  6. Court Myers

    Court Myers Guest

    OK... now how do i draw more points on the pline and at the end of it it
    inserts the block?
     
    Court Myers, Jul 6, 2004
    #6
  7. Similarly to the approach in the suggestion someone (I don't remember who --
    I already deleted it) made on your other question about the
    closing/filleting of a polyline of indeterminate number of points.

    Kent Cooper, AIA


    ...
     
    Kent Cooper, AIA, Jul 6, 2004
    #7
  8. Court Myers

    ECCAD Guest

    Go ahead and do the pline, then, (getvar "lastpoint") will return
    the 'last' point. Calculate your insert point from there.

    Bob
     
    ECCAD, Jul 7, 2004
    #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.