Thursday, April 24, 2025

Script to Create New Layers for Survey Plan Drawing in AutoCAD

 







LAYER NEW BorderLine,Beacons,BoundaryLine,Title,NorthArrow,ContourLine,Legend,Roads
COLOR 7 Beacons
COLOR 10 BoundaryLine
COLOR 7 Title
COLOR 5 NorthArrow
COLOR 12 ContourLine
COLOR 7 BorderLine


(alert "DONE CREATING THE LAYERS...")  



To list all the layers' names in the current drawing:-

(defun c:ListLayersSimple (/ tbl)
  (setq tbl (tblnext "LAYER" T)) ; Start of layer table
  (while tbl
    (princ (strcat "\n" (cdr (assoc 2 tbl)))) ; Layer name
    (setq tbl (tblnext "LAYER")) ; Next layer
  )
  (princ)
)


Thank you for reading.

No comments:

Post a Comment