+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Full Member
    Using
    AutoCAD 2013
    Join Date
    Jan 2015
    Posts
    50

    Default Question: Automating Layer Creation/Properties

    Registered forum members do not see this ad.

    Hello All,

    I work with projects that require several layers. I was wondering if anyone knows of a way to automatically create x number of layers with names like "name_1," "name_2," "name_..." "name_n-1," "name_n" without having to manually input each layer's name. Furthermore, I need each layer to have a different color. Again, is there a way to assign different colors automatically without having to go in and do it manually layer by layer?

    You all have been very helpful so far and I appreciate the time you take to help me become a better CADer.

    Best Regards,
    Beef

  2. #2
    Forum Deity
    Computer Details
    nestly's Computer Details
    Operating System:
    Windows 7 Pro (64bit)
    Using
    AutoCAD 2015
    Join Date
    Sep 2010
    Location
    PA
    Posts
    3,444

    Default

    For new drawings, you could create the Layers and assign the Colors in a Template file (.dwt) Any drawing started using that template will already have the Layers set up (same goes for Dimension styles, Text Styles, Linetypes, etc )

    For existing drawings, insert the template (mentioned above) into the existing drawing and all the layers will be imported. (note: if the existing drawing already has a Layer, Style, Linetype, etc with the same name, the existing Layer, Style, Linetype will NOT be overwritten)

  3. #3
    Full Member
    Using
    AutoCAD 2013
    Join Date
    Jan 2015
    Posts
    50

    Default

    Hi, nestly.

    Can you tell me exactly what you mean by "insert the template into the existing drawing?"

    Thanks.

  4. #4
    Forum Deity
    Computer Details
    nestly's Computer Details
    Operating System:
    Windows 7 Pro (64bit)
    Using
    AutoCAD 2015
    Join Date
    Sep 2010
    Location
    PA
    Posts
    3,444

    Default

    Here's a Youtube video that demonstrates several methods of importing layers from existing drawings/templates. The INSERT method is covered from 4:00 to 5:15, but you may find some of the other techniques better suited to your needs.
    https://www.youtube.com/watch?v=ryUrWfNdW_0

  5. #5
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,882

    Default

    The other simple way is to use a script just save this modify as required, you can have way to many layers then do a individual purge to remove unwanted after using, you can re run the script as many time as you like to re add.

    -purge la Name_* N

    Code:
    -Layer
    N name_1 C name_1 1 Lt name_1 dashed 
    N name_2 C name_2 2 Lt name_2 continuous 
    N name_3 C name_3 3 Lt name_3 dashed2 
    N name_4 C name_4 1  Lt name_4 centre
    A man who never made mistakes never made anything

  6. #6
    Full Member
    Using
    AutoCAD 2013
    Join Date
    Jan 2015
    Posts
    50

    Default

    Quote Originally Posted by nestly View Post
    Here's a Youtube video that demonstrates several methods of importing layers from existing drawings/templates. The INSERT method is covered from 4:00 to 5:15, but you may find some of the other techniques better suited to your needs.
    https://www.youtube.com/watch?v=ryUrWfNdW_0
    Thank you, nestly. Unfortunately I can't view Youtube right now, but I will definitely give this a look when I get home. I appreciate your response.

    Beef

  7. #7
    Full Member
    Using
    AutoCAD 2013
    Join Date
    Jan 2015
    Posts
    50

    Default

    Registered forum members do not see this ad.

    Ah. I know what you're showing me. Yes, I've already figured out how to do that. I'm looking for something more like a script, which I've learned more about since posting originally. I think I have my answer. Thanks anyway.

Similar Threads

  1. Dynamic block creation question
    By JamFam in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 8
    Last Post: 20th May 2013, 12:11 am
  2. Layer creation
    By ALoock in forum CAD Management
    Replies: 8
    Last Post: 21st Dec 2011, 12:20 pm
  3. Replies: 2
    Last Post: 24th Nov 2010, 11:43 am
  4. Learning....Solid creation question....
    By jlab13 in forum AutoCAD 3D Modelling & Rendering
    Replies: 3
    Last Post: 27th Dec 2008, 10:54 pm
  5. Layer Properties Manager question
    By TimSilver in forum AutoCAD Beginners' Area
    Replies: 10
    Last Post: 11th Jan 2008, 02:34 pm

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts