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.
I'm using AutoCAD 2010 Architecture
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.
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
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.
could be pretty handy.
I write LISP's but don't typically provide custom programming for free. Visit the Customization newsgroup. There are some very generous folks there.
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.
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.
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...
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.