AutoLISP to C#/VB.Net

AutoLISP to C#/VB.Net

taher.basha
Enthusiast Enthusiast
502 Views
0 Replies
Message 1 of 1

AutoLISP to C#/VB.Net

taher.basha
Enthusiast
Enthusiast

Hi Experts,

 

Please help me in converting this code into C# or VB.Net

 

(defun c:mergemultiple ( / lst)
  (setq lst '(("Layer*" "Lay")
              ("Doors*" "Door")))
  
  (foreach e lst (mergelayers (car e) (cadr e)))
  (princ)
)
    

(defun mergelayers (match to / lst def lay)
  (setq str "")
  (while (setq def (tblnext "LAYER" (null lay)))
    (if (wcmatch (setq lay (cdr (assoc 2 def))) match)
      (setq lst (cons lay lst))))
  (if lst
    (progn
      (command "_.LAYMRG")
      (foreach e lst (command "_Name" e))
      (command "" "_N" to "_Y")))
  (princ)
)

Thanks in Advanced

0 Likes
503 Views
0 Replies
Replies (0)