Global Rename

Using Autocad its possible to remove or add prefixes and suffixes to layer names by using the "rename" command and a wildcard.

However BricsCad doesnt appear to allow wildcards when using "-rename"

Is there an add-on or some other way to do this?

Thanks 

Comments

  •  I am also looking for this function in BricsCAD. 
    This should be a little "coffee break task" for a programmer?

    Mustafa
  • Raised an SR with this feature request??
    Wild card referencing has been included for other commands where it was found missing .e.g -PSETUPIN

    Regards,
    Jason Bourhill

  • I have a strong idea it used to work, but it doesn't in my v15.
    I have used this lisp for a long time and it still works.
    It just adds 880- to all layer names, or removes them if they are there.
    If half the layers have it and half don't, it just transposes the mess but I can't be bothered fixing that.

    (Defun C:880 ()
    (SETVAR "CMDECHO" 0)
    (SETQ A (TBLNEXT "LAYER" T))
    (while (/= nil a)
    (setq a (tblnext "layer") b (cdr (assoc 2 a))
    )
    (if (/= nil a)
    (progn
    (if (= "DEFPOINTS" b)(setq a (tblnext "layer") b (cdr (assoc 2 a))))
    (if (= "0" b)(setq a (tblnext "layer") b (cdr (assoc 2 a))))
    (if (= "880-" (substr b 1 4))
    (command "rename" "la" b (substr b 5 (strlen b)))
    (command "rename" "la" b (strcat "880-" b))
    )
    )
    )
    )
    )

  • I have a Lisp routine that I wrote a few months ago that will behave similar to the Rename command in AutoCAD. It will add and remove layer name prefixes to all layers or it can be used as a find and replace if you do not want all of the layers to be renamed.  I will post it here later...

This discussion has been closed.