Inserting blocks with lisp

Discussion in 'AutoCAD' started by Cliff Davis, Oct 16, 2003.

  1. Cliff Davis

    Cliff Davis Guest

    I am using the following code to insert blocks because it allows me to prompt for the rotation angle.

    (princ "\nSelect insertion point for block: ")
    (command "-insert" some_block "s" (getvar "dimscale") pause nil)
    (princ "\nRotation angle: ")
    (command "-insert" some_block "s" (getvar "dimscale") (getvar "lastpoint") pause)

    The problem is that when there is are running osnaps and an osnap is manually selected the (getvar "lastpoint") returns the point
    picked by the running osnaps. For example with a running osnap of endpoint and selecting the midpoint of a line the (getvar
    "lastpoint") returns the endpoint. Is there another way that I should be doing this?
    Thanks
    Cliff
     
    Cliff Davis, Oct 16, 2003
    #1
  2. Cliff Davis

    Cliff Davis Guest

    I have in the past, but it doesn't allow a graphic representation of the block while inserting.
    Thanks
    Cliff
     
    Cliff Davis, Oct 16, 2003
    #2
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.