laymrg

Yass
edited December 2020 in LISP Codes

I would like to run a script I've edited from a from one used in autocad for merging layers and wonder if there is command like "laymrg" in BricsCAD?
The goal is to remove for example "BRX..." or "Background_" prefix in layers of a drawings created with BIM section entities.

(defun MergeLayers (#OldLayers #NewLayers / #Layers)
(setq #Layers (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))))
(mapcar
'(lambda (o n)
(and (tblsearch "layer" o)
(or (tblsearch "layer" n) (vla-add #Layers n))
(vl-cmdf ".-laymrg" "_n" o "" "_n" n "_y")
) ;
and
) ;_ lambda
#OldLayers
#NewLayers
) ;_ mapcar
)
(MergeLayers '("BRX_2D+_A-42D-----" "Background_BRX_2D_A-45------") '("A-42D-----" "A-45------"))
)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!