autolisp

Discussion in 'AutoCAD' started by Paul Caruthers, Jan 19, 2005.

  1. I must admit, I've never had to deal with this before....

    i would like to set up a toolbar button that will turn off a predefined set
    of layers. We don't give our sales office fully dimensioned drawings, we
    turn off all the dims, notes, atb, .....so all the end up with is walls,
    windows & doors, and room names.... any help would be appreciated.

    I've considered just make up some new tabs and turning of these layers in
    the viewports, but that would involve alot of work....a button would be
    soooo much easier.

    Paul caruthers
     
    Paul Caruthers, Jan 19, 2005
    #1
  2. Explore Layer States in help.
     
    Daniel J. Altamura, R.A., Jan 19, 2005
    #2
  3. Paul Caruthers

    LARRY Guest

    HOW ABOUT MAKING A BUTTON WITH THE MACRO

    ^C^C-LAYER OFF "LAYER NAME,LAYER NAME, ECT" ;
     
    LARRY, Jan 19, 2005
    #3
  4. Paul Caruthers

    Anne Brown Guest

    Paul -

    In addition to any replies you might receive or have already
    received, you may find more information or responses by posting
    future lisp/customization related questions in the following
    discussion group:

    Web browser:
    http://discussion.autodesk.com/forum.jspa?forumID=130
    Newsreader:
    news://discussion.autodesk.com/autodesk.autocad.customization
     
    Anne Brown, Jan 19, 2005
    #4
  5. Thanks Matt, that's almost got it. I've got to hit the button twice, for
    some reason, but it's a starting point.
    this is what i've got working C^C^_-la;of;dim,not,beam,girder,cen,atb,hat

    time for a little home work tonight.

    Paul Caruthers
     
    Paul Caruthers, Jan 19, 2005
    #5
  6. Paul Caruthers

    Matt Guest

    You should be close. Try to use 2 semicolons at the end to close the
    command. BTW - simple layer/command macros can be pretty handy once you get
    the hang of them, even if you are on full cad (I unfortunately use LT). I
    have macros to turn groups of layers on/off , lock viewports, reload xrefs
    plus all the handy ones that Chip Harper supplied on his site. Good luck.

    Matt
     
    Matt, Jan 19, 2005
    #6
  7. Paul Caruthers

    Cad Dept Guest

    Use Layer Manager, lman at the command, its under the Express pull down,
    layers
     
    Cad Dept, Jan 21, 2005
    #7
  8. Paul Caruthers

    Tom Smith Guest

    under the Express pull down

    Per previous discussions, LMAN has been obviated by the layer state
    functionality added to the basic layer manager. It's always preferable to
    use a "core" functionality if it's available, rather than an add-on.

    In any case, the OP has already got an answer he seems happy with. I also
    think that using layer states would have been a good solution, but he seemed
    to want a "button" to do the work.
     
    Tom Smith, Jan 21, 2005
    #8
  9. Thanks for suggestions. I have explored and played with the "layer states"
    process. If I'm doing it correctly ( I have saved the 2 states that I would
    like) it is a several stroke process to flip between an "all layers on mode"
    to "what I want". The tool bar button/macro is faster. and far easier to
    explain to the other user in the office that is...barely cad literate....but
    a good guy anyway.

    Paul
     
    Paul Caruthers, Jan 21, 2005
    #9
  10. You can restore layer states from a macro as well. Use -LAYER as follows:
    ^c^c_-layer;a;r;layerstatename;;;
     
    Daniel J. Altamura, R.A., Jan 21, 2005
    #10
  11. Duh, yeah I suppose you could....if I had thought of that...

    Now, what would be the advantage to that. The end result is the same (at
    least for this specific case), the unwanted layers are turned off. With the
    toolbar it becomes a universal tool in any drawing. Doesn't the layer state
    have to be imported to each drawing that it would be used? I have a library
    of about 30 standard house plans (templates)and a half dozen condos, and
    from these I produce about 120-150 set of plans in a given year. in
    addition to the 4-5 new designs we create to introduce the next year. This
    whole thing came about because, we supply the sales office with stripped
    drawings of the standard plans (no notes, dims, any real info), and our
    design center gets striped drawings for those houses that we actually
    sell/build and are used to make notes on when the buyers come in to make
    there interior selections....anyway, it was always a Pain in the Butt to go
    in and turn off all those layers one at a time.

    Paul Caruthers
     
    Paul Caruthers, Jan 21, 2005
    #11
  12. Paul Caruthers

    Matt Guest

    By the way Paul.....you might like this.

    C^C^_-la;a;s;statename;;;
    then
    C^C^_-la;s;r;statename;;;

    The first will save your layer state ("statename") is whatever you want to
    call it. Then make the changes to your layers and finally use the second
    macro to restore your layer state. Obviously the statename needs to match
    in both macros. You could even incorporate the first one into the layer you
    used to turn off your selected layers.

    Matt
    (Proud new owner of an '04 Mach 1....this sucker is serious.)
     
    Matt, Jan 27, 2005
    #12
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.