Jump to content

Turn off layers in more than one drawing?


Siberian

Recommended Posts

I have several drawings, all of which have the same layers that I want to turn off. Is there a way to do this just once without having to go through the whole bundle of drawings? Lisp?

Link to comment
Share on other sites

Are the layers you want to turn off within an xref that is attached to all the drawings or are the layers native to each drawing?

Link to comment
Share on other sites

I had the same problem with layers. I also had to add xrefs

 

Below is a lisp program I/the guys on here wrote for me

 

Modify it for your drawings

 

 

(DEFUN C:XR2 ()

(command "._XREF" "_A" "m:\\7635-87\\acad\\XR-Cadastral.dwg" "0,0" "1" "1" "0")

(command "._XREF" "_A" "m:\\7635-87\\acad\\XR-sewer.dwg" "0,0" "1" "1" "0")

(command "._XREF" "_A" "m:\\7635-87\\acad\\XR-water reticulation.dwg" "0,0" "1" "1" "0")

(command "._XREF" "_A" "m:\\7635-87\\acad\\XR-survey.dwg" "0,0" "1" "1" "0")

(command "._XREF" "_A" "m:\\7635-87\\acad\\XR-ergon.dwg" "0,0" "1" "1" "0")

(command "_.layer" "T" "xr-ergon|ex-elect-ug" "")

(command "_.layer" "T" "xr-telstra|ex-telstra" "")

(command "_.layer" "on" "xr-telstra|ex-telstra" "")

(command "_.layer" "Off" "xr-survey|survey-electricity" "")

(command "_.layer" "t" "xr-survey|survey-electricity" "")

(command "_.layer" "t" "xr-cadastral|map_address_txt" "")

)

Link to comment
Share on other sites

  • 10 months later...
Yes, lisp could do that. Something like:

(defun c:layoff()

(command "layer" "off" "DIMENSIONS,HATCHES" "")

)

replace the words in UPPERCASE with your own layer names.

Here I described a way to run a lisp on several drawings:

http://www.cadtutor.net/forum/showthread.php?t=19474

 

 

Hello.. I am green LISP could you make attach for that... and how run lisp for several drawings? Please could you give me standart which works :)

 

 

Thanks

Link to comment
Share on other sites

Running lisp over several drawings can be acheived simply using a script file, but before running you need to add the layoff lisp program into you acad.lsp so it can be found automatically.

 

script is then

open dwg1 layoff close Y

open dwg2 layoff close Y

open dwg3 layoff close Y

open dwg4 layoff close Y

 

Just create the script in notepad etc save with a name and extension.SCR

 

There are other forum topics here about picking a group of files and having a lsip program do something maybe start with "open files"

Link to comment
Share on other sites

Yes, lisp could do that. Something like:

(defun c:layoff()

(command "layer" "off" "DIMENSIONS,HATCHES" "")

)

replace the words in UPPERCASE with your own layer names.

Here I described a way to run a lisp on several drawings:

http://www.cadtutor.net/forum/showthread.php?t=19474

Hello.. I am green LISP could you make attach for that... and how run lisp for several drawings? Please could you give me standart which works :)

 

 

Thanks

Did you check the link in my post?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...