v2005 to 2008: Insert Block issue

Discussion in 'AutoCAD' started by Mr. B, Oct 17, 2007.

  1. Mr. B

    Mr. B Guest

    I've recently upgraded from 2005 to 2008. And I've only one issue that I'm a
    bit stuck on. It involves inserting my Symbols.

    I do electrical design and have lots of symbols. I use a combination of PopUp
    menus and Lisp to insert my symbols. When I insert a symbol, I pick my insert
    point, rotate it, and press Return (or Spacebar) and then continue on with
    multiple inserts.

    Under 2005, I had no issues. In 2008, the issue (minor that it is), is that
    Periodically I only insert One symbol.

    When this happens, a 2nd (unwanted) symbol gets added to the drawing way off
    in the distance. This never occured in 2005 and my Lisp hasn't changed.

    My Lisp code is:

    (prompt "Pick insert point ...")
    (Command "-Insert" Fgr "S" FigScal pause pause)
    (Command "Copy" "L" "" "M" (getvar "Lastpoint"))

    It's the 2nd Copy Last command that appears to create my unwanted 2nd symbol.
    I've tried a few ideas with different code, but can not get around this.

    I know that if I press ESC instead of Return (or Spacebar), the 2nd symbol
    does NOT get inserted.

    Any suggestions?

    Regards,

    BruceF
     
    Mr. B, Oct 17, 2007
    #1
  2. Mr. B

    rriggs Guest

    I'm not exactly sure why this is a problem, but the rotation prompt
    doesn't like the pause statement.
    I dropped the last pause statement and got this code to work.
    Maybe autodesk changed the way the insert command works in regards to
    the rotate function that it uses.
    I know that in 2007 they introduced some automatic rotate3d functions
    when in a 3d view, that may have caused a rewrite of the functions
    insert refers to get the job done? Anyway I think its a pretty good
    find.

    (defun c:insroco (/ inspt)
    (command "-insert"
    "test"
    (setq inspt (getpoint "\nSpecify Insertion Point: "))
    pause pause
    )
    (command "copy" "l" "" "m" (getvar "lastpoint"))
    )
     
    rriggs, Oct 23, 2007
    #2
  3. Mr. B

    Mr. B Guest

    Hmm... I'll try that.
    Who knows, eh?
    Thanks!

    BruceF
     
    Mr. B, Oct 23, 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.