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

Redefine Layers from template file

12 REPLIES 12
Reply
Message 1 of 13
Klingi162
2214 Views, 12 Replies

Redefine Layers from template file

Hey folks,

 

I'm trying to set up a company layer structure and want to use LISP. Therefore I'd like to use a template file and set every layer with it's specific linetype and color there. If I change something in the template, say the color of a layer, it should update this in the drawing when I hit the LISP command.

 

Thanks for your Help. Smiley Happy

 

I'm using AutoCAD 2010 Architecture

12 REPLIES 12
Message 2 of 13
pendean
in reply to: Klingi162

If you change the template, why do you need a lisp?
Message 3 of 13
dbroad
in reply to: Klingi162

Before you consider using LISP, try the projectstandards command.  It will manage much more than just synchronizing layers between multiple drawings.  The AutoCAD standards and checkstandards commands also work well.  Laytrans can be used to set up a layer translation table.

 

To learn about lisp, visit the customization newsgroup.

Architect, Registered NC, VA, SC, & GA.
Message 4 of 13
Klingi162
in reply to: pendean

The lisp should read the template and change the drawing I'm working in to the same settings from the template. Also the colors and linetypes shall change to this settings.

If there is a different way to set this up without a lisp I'm also happy

Message 5 of 13
pendean
in reply to: Klingi162

Message 6 of 13
Klingi162
in reply to: pendean

this takes all way too long and nobody in my company whould know how to use this. I remember it from my old company that we just had to hit a shortcut and all layers were created and with another shortcut it changed all the linetypes and colors of the layers to the one from the template.

I wonder why nobody already scripted such LISP. Smiley Frustrated

could be pretty handy.

Message 7 of 13
dbroad
in reply to: Klingi162

I write LISP's but don't typically provide custom programming for free.  Visit the Customization newsgroup.  There are some very generous folks there.

Architect, Registered NC, VA, SC, & GA.
Message 8 of 13
David_Knight
in reply to: Klingi162

You could create a block (what we do) that has all layers, text styles, dimension styles within it. Then insert the block with a click of a button.

It will not redefine anything within the drawing though.

Once we insert it, we delete the block. Then anything can be purged out again. If we need it, we just reinsert it again.

Message 9 of 13
Klingi162
in reply to: Klingi162

Yes,that's how I do it right now,but it's not really handy. 😞
Whould be great to have a shortcut for this issue to get all layers and reset them to the changes from the template file.
Message 10 of 13
David_Knight
in reply to: Klingi162

this is a snippit from a script i use to change layers i was getting for a project.

it'll do what your talking about... but im not sure what happens if the layers dont exist.

 

try and mess with it.

 

this is not lisp. just a script.

 

 

 

-layer
C
red
A-Anno-Note.A,A-DOOR
C
blue
A-FLOR-WDWK.A,A-FLOR-SPCL.A
C
magenta
A-Wall-INTR.A,A-Wall
C
cyan
A-FLOR-OTLN.A
c
green
E-LITE-CLNG.E,A-CLNG.A,A-CLNG-ACCS.A
c
yellow
A-FLOR-CHASE.A
c
white
defpoints
ltype
hidden2
A-FLOR-OTLN.A,A-FLOR-CHASE.A

 it'll prove usefull to you.  You might have to do a 2-stage redefine.  stage 1, insert block, stage 2, run this script.  then again, maybee you can figure out how to do it all right in here. (-layer, new?) and just duplicate your layers.

 

 

maybee have the script run through "Creating" them.  then "redefining" them.  that way if they exist, it'll fix them.

Message 11 of 13
pendean
in reply to: David_Knight

use -LAYER command's MAKE to ensure a layer is eitgher created if missing or made current if it exists, then rewrite the script accordingly (always assume they are missing unless you want to include a layer creation portion at the start of your script).
Message 12 of 13
jwp0015
in reply to: David_Knight

This is what I've set up for our firm. It's great for inserting missing layers, but lacks in the ability to redifine layers already in the drawing...

Message 13 of 13
R_Tweed
in reply to: Klingi162

I use _standards command to accomplish something similar which may be a good starting point. Also, the _Laytrans command works well when you want to update a drawing that has several layers that should be merged (wall, walls, a-wall, c_wall, c-wall, site-wall, walls_by_ ted..). These can be found under the manage tab on the ribbon.

 

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

Post to forums  

Autodesk Design & Make Report

”Boost