Block Insertion Swap Routine for AutoCAD

I was asked today if I knew of a way to swap out a single block for another block? I knew that the Express tools could do this, but a global block redefinition was not what we were looking for.So I did a quick search in the AUGI lisp forums and found a routine posted by Miff that was close to doing what I needed. In reviewing the routine, I realized that it would be nice to allow single or multiple selection. I modified the routine slightly to remove the SSGET modifier for single selection (ssget “_:S”) resulting in this code:

(if (and (setq ss (ssget ":S" '((0 . "INSERT"))))
becoming this code:

(if (and (setq ss (ssget '((0 . "INSERT"))))

Since I wanted all the staff to be able to utilize this routine, I added an autoloader to the company standard acaddoc.lsp file and placed the newly named “blkswap.lsp” file out in the network applications folder:

(autoload "blkswap" '("blkswap"))

You’re welcome to download my modified version here:blkswap.lsp
Or grab Miff’s original from the AUGI forums.
Thanks Miff!
Thanks to AUGI as well for providing such a fantastic resource.

Here is a short video detailing how to use the routine once it is available via autoload.

blkswap gif
How to Use BlkSwap

If you will take proper dosage of Erectile Dysfunction Medication Once you’re cleared by your doctor depending on your condition levitra uk and your response to the medicine. The release of nitric acid takes cialis generika 5mg place during sexual stimulation. Anyhow generic viagra https://unica-web.com/watch/2017/my-superhero.html has placed very well impact in positive to the curing of this disorder. viagra works in an hour after taking the pill. Health conditions such as being overweight or obese, buy women viagra heart disease, high blood pressure, and depression are seen as inhibitors to being able to get better erections.

4 thoughts on “Block Insertion Swap Routine for AutoCAD

  • August 13, 2009 at 07:58
    Permalink

    Thanks Scott,

    I knew others would find it handy.
    Its a good example of the benefit of being an AUGI member. While the routine as it existed on AUGI didn’t do exactly what I wanted, it was close enough to be quickly modified to suit the needs at present.

    ~Richard

  • July 26, 2012 at 11:59
    Permalink

    looks like your modified routine is missing, can you repost it? Would be very much appreciated!

Leave a Reply