Help with a way to move text to proper layer.

Help with a way to move text to proper layer.

Anonymous
Not applicable
963 Views
2 Replies
Message 1 of 3

Help with a way to move text to proper layer.

Anonymous
Not applicable

Hello,

 

Here's the deal.

 

Change layer of selected single line text with contents = 100  to  layer named "100" (already created).

 

Many thanks.

0 Likes
Accepted solutions (1)
964 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

Try This, I got this from one of my friend.

(defun C:LTT ()

(setq cmdold (getvar "cmdecho"))
(setvar "cmdecho" 0)

(nameonly)

(setvar "cmdecho" cmdold)
(princ "\nLayers Have Been Successfully Created...")
(princ)

);END DEFUN

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun nameonly ()

(prompt "\nSelect Text to Create Layers...")
(setq sel1 (ssget))

(setq n (sslength sel1))
(setq index 0)

(repeat n
(setq sel2 (entget (ssname sel1 index)))
(setq layname (cdr (assoc 1 sel2)))
(setq index (1+ index))
(if (/= (tblsearch "LAYER" layname))
(progn
(command "-layer" "n" layname "")
)
)


);END repeat


(setq n (sslength sel1))
(setq index 0)

(repeat n
(setq sel2 (entget (ssname sel1 index)))
(setq layname (cdr (assoc 1 sel2)))

(if (/= (tblsearch "LAYER" layname))
(progn
(command "-layer" "n" layname "")
(command "CHPROP" (ssname sel1 index) "" "LA" layname "")
)
(progn
(command "CHPROP" (ssname sel1 index) "" "LA" layname "")
)
)

(setq index (1+ index))
);END repeat

);END DEFUN

Message 3 of 3

ВeekeeCZ
Consultant
Consultant
(defun c:100toLayer (/ ss)
  (if (setq ss (ssget "_A" '((0 . "TEXT")(1 . "100"))))
    (command "_.chprop" ss "" "_Layer" "100" ""))
  (princ)
)

 

0 Likes