Results 1 to 3 of 3

Thread: -blockreplace command line/LISP help

  1. #1
    Login to Give a bone

    Default -blockreplace command line/LISP help


    Trying to work with using the -blockreplace command in a LISP.

    I am having trouble forming the command. Can anyone help get me started in the right direction?

    Many thanks.

    Here is what I am trying to execute, but I can't quite get the syntax right to where it will execute from the command line.

    (command "-BLOCKREPLACE" "ANALOG_PT_BLK" _Point Block FD "y" "")

    Overall I have a pretty simple task to accomplish.

    I want to run a LISP that will look for a block and replace it with another block. The block names never change.

    Here is an example of a LISP I was trying to work with.

    (defun c:ReplaceBlocks ()
    (setq fromBlock "ANALOG_PT_BLK") ; Specify the source block name
    (setq toBlock "_Point Block FD") ; Specify the target block name

    (if (tblsearch "block" fromBlock)
    (command "-BLOCKREPLACE" fromBlock toBlock "y" "")
    (princ (strcat "\nBlock replacement complete."))
    (princ (strcat "\nBlock '" fromBlock "' not found."))


  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    Turlock, CA
    Login to Give a bone

    Default Re: -blockreplace command line/LISP help

    I just posted a lisp that can replace blocks by several methods. It has several command in it.
    C:> ED WORKING....


  3. #3
    All AUGI, all the time
    Join Date
    Login to Give a bone

    Default Re: -blockreplace command line/LISP help

    (command "-BLOCKREPLACE" "ANALOG_PT_BLK" "_Point Block FD" "y" "")

Similar Threads

  1. Anonymous Block Names Stumping SSX and BLOCKREPLACE...
    By swojtynek408932 in forum CAD Management - General
    Replies: 4
    Last Post: 2013-09-16, 07:52 PM
  2. Replies: 0
    Last Post: 2011-11-23, 03:50 PM
  3. Select Blocks when using BLOCKREPLACE
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2008-10-11, 08:48 PM
  4. Blockreplace in Multiple drawings
    By nicholaskamm in forum AutoLISP
    Replies: 2
    Last Post: 2008-04-17, 12:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts