Beginner: command ".refedit" in AutoLISP

Discussion in 'AutoCAD' started by Cleaner, Jan 27, 2008.

  1. Cleaner

    Cleaner Guest


    my problem is simple. I want the user to select a block, and then
    perform the command "-refedit". I have the following code:

    (while (= setSelection nil)
    (setq setSelection (ssget ":S" (list (cons 0 "INSERT"))))
    (setq strBlockName (ssname setSelection 0))

    Now I can use strBlockName to, for example, erase it:

    (command ".erase" strBlockName "")

    But this doesn't work with "-refedit". I have tried to use the handle
    of the block, but it doens't work either:

    (setq objHandle (cdr(assoc 5 entBlockData)))
    (command ".-refedit" objHandle "ok" "all" "yes")

    Can some one please tell me how to select a block (a reference?) and
    than perform the command refedit on the block?

    Thank you very much.
    Cleaner, Jan 27, 2008
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.