Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

search text, move to new layer

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
319 Views, 3 Replies

search text, move to new layer

I've been trying for a month or so to find a way move certain text with a lisp routine or anything to a new layer. For instance, there are "land hooks" drawn on a map, and there are 4000 of them. They are all the letter Z. I want to move all of those to their own layer, and I don't want to select all 4000. There's also strings of other texts I'd like to be able to search, and move to a layer but just that letter Z would help immensely. I'd also like to be able to search for R#### with 4 numbers after the R and move all those text entities to a separate layer. Any ideas on a method, or know of a lisp routine that'd allow this? Thanks for any direction!
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

carlomaagno wrote:
> I've been trying for a month or so to find a way move certain text with a lisp routine or anything to a new layer. For instance, there are "land hooks" drawn on a map, and there are 4000 of them. They are all the letter Z. I want to move all of those to their own layer, and I don't want to select all 4000. There's also strings of other texts I'd like to be able to search, and move to a layer but just that letter Z would help immensely. I'd also like to be able to search for R#### with 4 numbers after the R and move all those text entities to a separate layer. Any ideas on a method, or know of a lisp routine that'd allow this? Thanks for any direction!

check out Quick Select on your Shift-right click menu.

highlight grips on a text object then Shift right click
Apply to: Entire Drawing
Object Type: Text
Properties: Contents
Operator: = Equals
Value: Z

hit OK

Command: Select
Select Objects: Previous
and change their layer all at one time

Dave
DDP
Message 3 of 4
Anonymous
in reply to: Anonymous

Thanks so much! I used FILTER to do the same thing. Using Text Value = Z

Then using text value = R##### which uses # as the wildcard for numbers. Saved me hours upon hours! Maybe 100 hours?

These other wildcards I found useful.

# (Pound)
Matches any numeric digit

@ (At)
Matches any alphabetic character

. (Period)
Matches any nonalphanumeric character

* (Asterisk)
Matches any string and can be used anywhere in the search string

? (Question mark)
Matches any single character; for example, ?BC matches ABC, 3BC, and so on

~ (Tilde)
Matches anything but the pattern; for example; ~*AB*matches all strings that don't contain AB

[ ]
Matches any one of the characters enclosed; for example, [AB]C matches AC and BC

[~]
Matches any character not enclosed; for example, [~AB]C matches XC but not AC

[-]
Specifies a range for a single character; for example, [A-G]C matches AC, BC, and so on to GC, but not HC

` (Reverse quote)
Reads the next character literally; for example, `~AB matches ~AB


Thanks for the tip!
Message 4 of 4
Anonymous
in reply to: Anonymous

carlomaagno wrote:
>
> Thanks for the tip!

thanks for the wildcards. There's a couple I wasn't aware of
Dave
DDP

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

Post to forums  

Forma Design Contest


Autodesk Design & Make Report