THANKS GUYS FOR YOUR VALUE ABLE ADVICE, ITS THE TIME OF AI, NOW HE MAKE AS I WANTED, CHECK THIS
(defun c:TopoImport (/ file line data ptNo x y z layName pt)
(setq file (getfiled "Select CSV File" "" "csv" 0))
(if file
(progn
(setq f (open file "r"))
(read-line f) ; Skip the header row (A1, B1, etc.)
(while (setq line (read-line f))
(setq data (csv-split line ","))
(setq ptNo (nth 0 data)
x (atof (nth 1 data))
y (atof (nth 2 data))
z (atof (nth 3 data))
layName (nth 4 data)
pt (list x y z))
;; Create the layer if it doesn't exist
(if (not (tblsearch "LAYER" layName))
(command "-layer" "m" layName "")
)
;; Draw the Point on the specified layer
(entmake (list
'(0 . "POINT")
(cons 8 layName)
(cons 10 pt)))
;; Draw the Text (Point Number) on "TEXT" layer
(if (not (tblsearch "LAYER" "TEXT"))
(command "-layer" "m" "TEXT" "c" "2" "" "") ; Creates Yellow Text Layer
)
(entmake (list
'(0 . "TEXT")
(cons 8 "TEXT")
(cons 10 pt)
(cons 40 0.2) ; Text Height: Adjust as needed
(cons 1 layName)))
)
(close f)
(princ "\nImport Complete.")
)
)
(princ)
)
;; Helper function to split CSV strings
(defun csv-split (str delim / pos lst)
(while (setq pos (vl-string-search delim str))
(setq lst (cons (substr str 1 pos) lst)
str (substr str (+ pos 2)))
)
(reverse (cons str lst))
)
IN THIS LSP, I FIXED THE TEXT , AND IT TAKE IN ONE SINGLE LAYER,