Author Topic: find drawings containing layer  (Read 6960 times)

0 Members and 1 Guest are viewing this topic.

ELOQUINTET

  • Guest
find drawings containing layer
« on: September 22, 2004, 01:40:15 PM »
on mdubs recommendation i have started a new topic. i am trying to run a script to turn on and make a layer non plot. the problem is i have tons of drawings with this layer that i don't have time to find. how can i search for drawings containing a given layer?

David Bethel

  • Swamp Rat
  • Posts: 656
find drawings containing layer
« Reply #1 on: September 22, 2004, 01:48:25 PM »
I can do via ZTree with just a regular text search on .dwg files.  The layer name needs to be a unquie non-ACAD term.  -David
R12 Dos - A2K

ELOQUINTET

  • Guest
find drawings containing layer
« Reply #2 on: September 22, 2004, 01:50:16 PM »
the layer is called z-barcode

M-dub

  • Guest
find drawings containing layer
« Reply #3 on: September 22, 2004, 02:13:48 PM »
Dan, just out of curiosity, have you tried Discovery?  Search for z-barcode.

ELOQUINTET

  • Guest
find drawings containing layer
« Reply #4 on: September 22, 2004, 02:22:35 PM »
yeah tried nuttin. speakin od discovery mdub i'm messin with it right now. there must be a way to open the autocad drawing from the preview screen but i can't seem to get it. i would get a dialogue box but then i unchecked always ask so now when i try to open it just keeps repeating a file download box and i have to completly close out explorer. tried several ways but no go

M-dub

  • Guest
find drawings containing layer
« Reply #5 on: September 22, 2004, 02:27:43 PM »
Well, those will be hyperlinks to the dwf files that Discovery creates.  That's why I'm trying to find out how to convert hyperlinks to text in the Office Forum.  If we can do that, you could do a search for whatever it is, have it display the list instead of the previews, copy it into Excel and modify it into a script....if you wanted to, but at the very least, you could get your list that way......

M-dub

  • Guest
find drawings containing layer
« Reply #6 on: September 22, 2004, 02:29:19 PM »
It would require some monkeying around with the program and the html to have it open up the actual file in Acad...unfortunately...I tried that long ago...

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
find drawings containing layer
« Reply #7 on: September 22, 2004, 02:32:31 PM »
It is really irrelevant if the drawing has the layer or not.

Do this ...

Compile a list of all of the drawings you want to "fix" this problem in (if it exists) ...

Use a simple lisp program to test for the existence of this layer, if it exists, turn it on and set it to not plot.

In your script that processes the drawings, simply run the lisp.

Of course I wouldn't bother with doing that unless you are either..
a) sending these out to be plotted
b) plot from a program other than AutoCAD

what I would do is....

In the acaddoc.lsp (on your computer as well as other users) add this:
Code: [Select]

(if (tblsearch "layer" "z-barcode")
 (command "-layer" "ON" "z-barcode" "Thaw" "z-barcode" "P" "N" "z-barcode")
)


You do not need to make it a function unless you want to and then on EVERY drawing you (or others) open it is done for you. No spending time searching for the drawings to "fix" .... noone has to build and run a script, wait for it to run etc... a simple housecleaning routine.
This will also reset it to not plot if a user changes the layer setting while editing.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

ELOQUINTET

  • Guest
find drawings containing layer
« Reply #8 on: September 22, 2004, 02:38:31 PM »
good idea keith but if i go mokeyin with others system files they start to shake. maybe some covert ops are in order good advice. it's mostly ok none it's all just part of my idiot proof brainstorming. whose the idiot for not thinking of all the possibilities....shhhh it's me

M-dub

  • Guest
find drawings containing layer
« Reply #9 on: September 22, 2004, 02:49:00 PM »
Keith to the rescue again...:)

ELOQUINTET

  • Guest
find drawings containing layer
« Reply #10 on: September 22, 2004, 03:42:52 PM »
ok did a search and found about 200 possible drawings containing layer. opened them in batches and with a little help the layer appeared and i saved it. so i would consider your idea a success keith thank you very much  :wink:

M-dub

  • Guest
find drawings containing layer
« Reply #11 on: September 22, 2004, 03:43:57 PM »
:oops:

ELOQUINTET

  • Guest
find drawings containing layer
« Reply #12 on: September 22, 2004, 03:47:32 PM »
see you learn sumpthin new everyday mdub  :wink:

ronjonp

  • Needs a day job
  • Posts: 7529
find drawings containing layer
« Reply #13 on: September 22, 2004, 04:23:35 PM »
You also might want to look at ezscript pro for making the script files. Very easy to use, especially if you want to run a lisp in each drawing.

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

ELOQUINTET

  • Guest
find drawings containing layer
« Reply #14 on: September 22, 2004, 04:49:08 PM »
ron where you been i was askin about ezscript. downloaded setup ran and nada how does that work?