Hi all,
I need to make a very simple lisp to
1.Find sets of 4 unique texts from a drawing, move them to correspond layers
2.Select all texts from 2 different layers, and change text to another layer.
For example,
Select 4 texts, such as “AB “ ;(AB and a space), “CD “, “EF “, “GH “
Then change “AB “to “layer 1”, “CD “ to “layer 2”, “EF “ to “layer 3”, and “GH “ to “layer 4”
And
Select all text from “layer 5”, change to “layer 6”
Select all text from “layer 7”, change to “layer 8”
As you can see, all the arguments are already given so all I need to do is run the lisp.
As a newbie, I used
(ssget "_X" '((0 . "TEXT")(1 . "AB ")))
(ssget "X" (List '(0 . "TEXT")'(8 . "layer5"))))
But it seems whatever I do, I get nothing. Could you somebody help me?
Thank you.
Solved! Go to Solution.
Solved by Ajilal.Vijayan. Go to Solution.
Hi,
The code which you mentioned should return a selection set.
try using the below code by changing "TEXT" to "*TEXT", so that the MTEXT will also include in the selection.
(setq sel (ssget "_X" '((0 . "*TEXT")(1 . "AB ")))) (command "change" sel "" "p" "la" "layer 1" "")
Also do you know that FIND and QSELECT commands can aslo return a selection set based on the given criteria ?
Originally, i wanted to use comand "filter" using preset list, but i could not figure out how to call the preset list.
This is good enogh for me at my level.
Thank you.
hi
I'm completly new with lisps.
This one looks like something I'm after, has anyone got final version and could share please.
Thanks