I am asking for a simple request because I have not found on online. I am not very good at creating lisp so I hope somebody here can help me out. I would like a lisp for basically 3 things.
1.) Select all text, mtext that are not .125 height
2.) Select all text, mtext that are not equal to .125 height
3.) Select all specific layers let’s say for example a layer called text-legend.
Thank you so much in advance and I hope someone can help me out with this problem. More power to you all.
Solved! Go to Solution.
Solved by olivier.eckmann. Go to Solution.
Solved by olivier.eckmann. Go to Solution.
Solved by olivier.eckmann. Go to Solution.
Hi,
1. (ssget "x" (list (cons -4 "<or") (cons -4 "<and") (cons 0 "MTEXT") (cons -4 "<NOT") (cons 43 0.125) (cons -4 "NOT>") (cons -4 "and>") (cons -4 "<and") (cons 0 "TEXT") (cons -4 "<not") (cons 40 0.125) (cons -4 "not>") (cons -4 "and>") (cons -4 "or>")))
2. same as 1
3. (ssget "x" (list (cons 8 "text-legend")))
Olivier
Thank you so much sir. That is perfect. It answered my question and I am learning a lot from just playing around with the commands. Now I’m trying more complicated this. I need help when this is the situation.
1.) Delete all text with a content of lets say for example (A), then move on to the next letter lets say (B) and so on and so fort. So basically it will look like this.
Delete the letter A, then delete the B, then delete th letter C.
I was able to write something like this.
delete;(setq sel1 (ssget "x" '((0 . "TEXT,MTEXT,Point") (1 . "A"))));;delete;(setq sel1 (ssget "x" '((0 . "TEXT,MTEXT,Point") (1 . "B"))));;
My problem is I want the command to continue if I yield a "Nill". thanks.
Hi,
(if (setq sel1 (ssget "x" '((0 . "TEXT,MTEXT,Point") (1 . "A")))) (command "delete" sel1 ""))
Olivier
Can't find what you're looking for? Ask the community or share your knowledge.