Author Topic: Moving Layers with a wildcard search?  (Read 1592 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Moving Layers with a wildcard search?
« on: June 10, 2016, 09:42:02 AM »
I stumbled on this thread.

http://www.cadtutor.net/forum/showthread.php?67438-LISP-to-move-selected-objects-to-a-specified-layer

I was looking at Lee's GIF and was thinking if there would be a way where the user could select objects, then a box would appear where I could type in a "*test*" a part of the layer name. Then it would just show the layer names with the wildcard "test" and I could select what layer to move the objects too...

I guess I am trying to figure out if there is a way instead of scrolling through layers and layers. I could do a filter of the layer name I am targeting...

Hopefully that make alittle more sense.

PS its so good to have theswamp.org back up!
Civil3D 2020

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Moving Layers with a wildcard search?
« Reply #1 on: June 10, 2016, 10:50:18 AM »
Have you tried using a Layer Filter?

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Re: Moving Layers with a wildcard search?
« Reply #2 on: June 10, 2016, 11:02:03 AM »
I know this ties back to layertrans. I know I have asked this before somewhat. We get a file from someone (and we get a lot from others). Insert our layers. Then select objects by either a LAYISO or SELECT SIMILAR to move to our layer with the pull down layer names.

I like the idea of the layer filters as you can use wildcards. Just not sure how to set this up.
Civil3D 2020

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Moving Layers with a wildcard search?
« Reply #3 on: June 10, 2016, 11:23:52 AM »
If all you want to do is select items on a layer with wild cards, just use something like this:
Code - Auto/Visual Lisp: [Select]
  1. (ssget ":L" '((8 . "*TEST*")))

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Re: Moving Layers with a wildcard search?
« Reply #4 on: June 10, 2016, 11:53:54 AM »
Still thinking. I like what you did Ron.
Civil3D 2020