Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Layer creation lisp routine?

  1. #1
    Member boeris9333's Avatar
    Join Date
    2006-03
    Posts
    4
    Login to Give a bone
    0

    Default Layer creation lisp routine?

    First off, I am new here...First post! woo hoo! I work at a engineering firm in Hillsboro, Or. and we are currently using version 2004.

    Anyways, I am looking for a LISP routine that will promt the user (or even a tool button) to select the layers they need out of a long list of layers when the standard "structural" template is opened. It would then set up the name, color, linetype, etc for you. Volia! I know all the layers and layer settings I want to include, but I just need the format. I can probably figure out how to modify the routine to include the stuff I want. I would appreciate any help on this!!!
    Justin

  2. #2
    Member
    Join Date
    2006-03
    Posts
    20
    Login to Give a bone
    0

    Default Re: Layer creation lisp routine?

    Here is one solution that doesn't even require LISP:
    You can save the template with all the possible layers, and when you open it, invoke the PURGE command, and simply remove the ones you don't need.
    This could also be done using LISP, but you wouldn't gain any speed or simplicity.
    I hope this helps.

  3. #3
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Layer creation lisp routine?

    Quote Originally Posted by boeris9333
    First off, I am new here...First post! woo hoo! I work at a engineering firm in Hillsboro, Or. and we are currently using version 2004.

    Anyways, I am looking for a LISP routine that will promt the user (or even a tool button) to select the layers they need out of a long list of layers when the standard "structural" template is opened. It would then set up the name, color, linetype, etc for you. Volia! I know all the layers and layer settings I want to include, but I just need the format. I can probably figure out how to modify the routine to include the stuff I want. I would appreciate any help on this!!!
    Justin
    Are there always set "groups" of layers that needed to be added, such as "a" "b" "c" "d" "e"....."z"? Or will some drawings need "a" "d" "g" "u".... and others need a different mix such as "a" "b" "u" "k" "w"??

    If there are defined groups of layers to be added, you could create a drawing for each group that contains those group of layers. Then you just need a bit of code to insert that drawing each time those layers are needed. This way the color, linetype, plotstyle, etc for the layers is easily set (by editing the drawing).
    R.K. McSwain | CAD Panacea |

  4. #4
    Member boeris9333's Avatar
    Join Date
    2006-03
    Posts
    4
    Login to Give a bone
    0

    Default Re: Layer creation lisp routine?

    Quote Originally Posted by zeljko.gjuranic
    Here is one solution that doesn't even require LISP:
    You can save the template with all the possible layers, and when you open it, invoke the PURGE command, and simply remove the ones you don't need.
    This could also be done using LISP, but you wouldn't gain any speed or simplicity.
    I hope this helps.
    I guess what I really want is a button that brings up a dialog box (similar to what the osnap dialog box looks like), at any point you can open it and select layers to be incorporated.
    Our LISP guy is on vaca. so I might just have to deal with a template with all the layers in it for now. I don't like the idea of purging layers before you have anything drawn, because 5 minutes into the drawing you may find you need several of the layers you just purged...
    Thanks

  5. #5
    Member boeris9333's Avatar
    Join Date
    2006-03
    Posts
    4
    Login to Give a bone
    0

    Default Re: Layer creation lisp routine?

    Quote Originally Posted by rkmcswain
    Are there always set "groups" of layers that needed to be added, such as "a" "b" "c" "d" "e"....."z"? Or will some drawings need "a" "d" "g" "u".... and others need a different mix such as "a" "b" "u" "k" "w"??

    If there are defined groups of layers to be added, you could create a drawing for each group that contains those group of layers. Then you just need a bit of code to insert that drawing each time those layers are needed. This way the color, linetype, plotstyle, etc for the layers is easily set (by editing the drawing).

    Mainly set groups, but the user may not need all of the layers in that set group.
    So for now, I have a template set up with ALL the layers, but I just started to create templates for foundation, framing, roof, etc...plans that only include layers that would be used in those specific type of plans. No code needed, just hit 'new' and select the appropriate template. Say you're going to be doing a foundation plan, select the 'struc-fdn' template.

  6. #6
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,105
    Login to Give a bone
    0

    Default Re: Layer creation lisp routine?

    Quote Originally Posted by boeris9333
    Mainly set groups, but the user may not need all of the layers in that set group.
    So for now, I have a template set up with ALL the layers, but I just started to create templates for foundation, framing, roof, etc...plans that only include layers that would be used in those specific type of plans. No code needed, just hit 'new' and select the appropriate template. Say you're going to be doing a foundation plan, select the 'struc-fdn' template.
    That would be the easiest to setup and maintain.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  7. #7
    Member boeris9333's Avatar
    Join Date
    2006-03
    Posts
    4
    Login to Give a bone
    0

    Default Re: Layer creation lisp routine?

    Oh yeah! Check this...
    I set my template up with no layers. Then saved a drawing file, only containing all the layers, to the same support template file. If you open content explorer, go to that layers drawing file, select layers, then drag and drop what you need. Also, if you don't use content explorer much (like me) just leave it in the layers of that drawing file when you close it and every time you open content explorer, your choice of layers are right there!
    No programming needed! ha

  8. #8
    AUGI Addict madcadder's Avatar
    Join Date
    2000-11
    Location
    Too far from the beach
    Posts
    1,054
    Login to Give a bone
    0

    Default Re: Layer creation lisp routine?

    Quote Originally Posted by boeris9333
    Mainly set groups, but the user may not need all of the layers in that set group.
    So for now, I have a template set up with ALL the layers, but I just started to create templates for foundation, framing, roof, etc...plans that only include layers that would be used in those specific type of plans. No code needed, just hit 'new' and select the appropriate template. Say you're going to be doing a foundation plan, select the 'struc-fdn' template.
    Instead of templates for foundation, framing, etc...

    why not use layer filters in the one template? easier to maintain; something changes and you change the one template - not five.

  9. #9
    I could stop if I wanted to CadDog's Avatar
    Join Date
    2005-06
    Location
    So Ca
    Posts
    439
    Login to Give a bone
    0

    Default Re: Layer creation lisp routine?

    Check this out...

    http://www.caddee.com/

  10. #10
    Member
    Join Date
    2009-07
    Posts
    45
    Login to Give a bone
    0

    Default Re: Layer creation lisp routine?

    Quote Originally Posted by boeris9333 View Post
    First off, I am new here...First post! woo hoo! I work at a engineering firm in Hillsboro, Or. and we are currently using version 2004.

    Anyways, I am looking for a LISP routine that will promt the user (or even a tool button) to select the layers they need out of a long list of layers when the standard "structural" template is opened. It would then set up the name, color, linetype, etc for you. Volia! I know all the layers and layer settings I want to include, but I just need the format. I can probably figure out how to modify the routine to include the stuff I want. I would appreciate any help on this!!!
    Justin
    You can use something like this...

    First code Lines is to load and reload a bunch of linetypes from a acad.lin file (you need to edit the folder inside the lisp and make sure there's an acad.lin in there to run) this way you fix linetypes.

    Then you can load layers by typing a lisp command.. like "arch" or "str" or so... attached an example..

    It will stuck if there an existing layer with the same name but frozen... , then you may need to thaw layers to make this routine to work always.
    Attached Files Attached Files

Page 1 of 2 12 LastLast

Similar Threads

  1. Special Layer Freeze LISP Routine
    By dbanker in forum AutoLISP
    Replies: 10
    Last Post: 2017-08-11, 12:32 PM
  2. LISP routine to overwrite layer descriptions...
    By dortega4269 in forum AutoLISP
    Replies: 39
    Last Post: 2014-07-23, 08:04 PM
  3. Layer Color Change LISP Routine
    By guardianfiredesign774457 in forum AutoLISP
    Replies: 19
    Last Post: 2013-08-28, 05:08 AM
  4. Add layer command line to a lisp routine
    By BrianTFC in forum AutoLISP
    Replies: 1
    Last Post: 2012-02-02, 07:47 AM
  5. Layer creation routine occasionally bombs CAD.
    By keelay711 in forum AutoLISP
    Replies: 4
    Last Post: 2007-02-23, 11:16 PM

Posting Permissions

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