AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Simple Lisp Request

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
burniksapwet
560 Views, 7 Replies

Simple Lisp Request

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.

7 REPLIES 7
Message 2 of 8
burniksapwet
in reply to: burniksapwet

bump
Message 3 of 8
burniksapwet
in reply to: burniksapwet

bump again

Message 4 of 8

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

Message 5 of 8

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.

 

Message 6 of 8

Hi,

 

(if (setq sel1 (ssget "x" '((0 . "TEXT,MTEXT,Point") (1 . "A")))) (command "delete" sel1 ""))

 

Olivier

Message 7 of 8

can that command be run in the command line? If so how do I do it. Thanks?
Message 8 of 8

Copy/paste in command line and press Enter

 

Olivier

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost