Layer off and Freeze

Discussion in 'AutoCAD' started by fontnhed, Mar 4, 2004.

  1. fontnhed

    fontnhed Guest

    I was told that mortals fear to tread here.
    Despite the warning, I’m hoping that I can get some help on this:
    I have a vendor who sends me these colossal drawings with every layer turned on.
    I really can’t use layer states to turn off the layers because they have no standardization.
    What I want to do is make a command that will perform a dual function:
    Turn off a picked layer and then freeze it.
    I tried coupling two simple tool button commands; ^c^clayoff_layfrz
    But it doesn’t work.
    Any suggestions?
     
    fontnhed, Mar 4, 2004
    #1
  2. fontnhed

    ECCAD Guest

    fontnhed,
    Is this what you wanted ?

    ;; Pick Object, Freeze Layer of that Object..
    (defun C:FL ( / ss ent olayer )
    (setq ss (ssget)); pick Object
    (if ss
    (progn
    (setq ent (ssname ss 0))
    (setq ent (entget ent))
    (setq olayer (cdr (assoc 8 ent)))
    (if (/= olayer "0")(command "_layer" "_f" olayer "off" olayer ""))
    ); epr
    (prompt "\nNothing selected ? ")
    );eif
    (princ)
    ); end function

    Bob
     
    ECCAD, Mar 4, 2004
    #2
  3. fontnhed

    Jeff Mishler Guest

    What happens if the selected object is on the current layer?

    Jeff
     
    Jeff Mishler, Mar 4, 2004
    #3
  4. fontnhed

    chevy Guest

    Is there a preference that you need layers off and freeze at the same time; freeze usually enough for me. I sure want to know the benefit that you are after.
     
    chevy, Mar 4, 2004
    #4
  5. fontnhed

    ECCAD Guest

    Jeff,
    Ya, I should have added:
    (command "_layer" "_s" "0" "")
    in there near the top.
    Whoopsie.
    Bob
     
    ECCAD, Mar 4, 2004
    #5
  6. fontnhed

    fontnhed Guest

    The reason I need to Turn off the layers and freeze them is that the files I get don't need to be edited, just printed.
    The vendors drawings have around 100 layers. The layer names change depending on who did the drawing and they seem to have no sense of standardization. There are so many layers involved all the information is unreadable because text is stacked on text and objects multiple times. All I can really do is try to turn off enough layers until I get something that will be readable once printed.
    Finally, the only way I can print these is in model space to extents. (That's why I need to freeze the layers I turn off)The drawings are a real pain in the backside. I'm just trying to find a way I can cut down on the time involved in dealing with them.
    Forgive me if i'm being to pedestrian. But if someone has a better idea, i'm definitely listening.
     
    fontnhed, Mar 4, 2004
    #6
  7. fontnhed

    Allen Jessup Guest

    I just came up with this. No customization needed. Use the layer freeze in
    Express tools to freeze the layers. Open the layer manager, sort by frozen
    by clicking at the top of that column, pick the first frozen layer, hold
    down the shift key, pick the last frozen layer, hit the little light bulb to
    turn them off. Not one step but it takes longer to write about it than to do
    it. You can also use Layoff and reverse the process to freeze them.

    Allen

    I get don't need to be edited, just printed.
    depending on who did the drawing and they seem to have no sense of
    standardization. There are so many layers involved all the information is
    unreadable because text is stacked on text and objects multiple times. All I
    can really do is try to turn off enough layers until I get something that
    will be readable once printed.
    (That's why I need to freeze the layers I turn off)The drawings are a real
    pain in the backside. I'm just trying to find a way I can cut down on the
    time involved in dealing with them.
    i'm definitely listening.
     
    Allen Jessup, Mar 4, 2004
    #7
  8. I have long had Tablet and pull-down menu items to Freeze, or Turn Off, a
    Layer by Picking an item on it, that look like this:

    [FrzLayPk]*^C^C^P-LAYER F (cdr (assoc 8 (entget (car (entsel "Select Item on
    Layer to FREEZE: "))))) ^P\;
    [OffLayPk]*^C^C^P-LAYER OF (cdr (assoc 8 (entget (car (entsel "Select Item
    on Layer to turn OFF: "))))) ^P\;
    (and also one for Locking, using the same kind of format)

    They repeat automatically, for as many items as you want to pick.

    You could combine them with something like (without the automatic-repeat
    part here):

    (setq layofrz (cdr (assoc 8 (entget (car (entsel "Select Item on Layer to
    FREEZE: ")))))) \-LAYER OF !layofrz F !layofrz;;

    It would not work if the item picked was on the current layer, but you could
    avoid that by having it set the Layer to 0 first (assuming that's one you're
    not going to want to shut down), like this (with automatic repeating back
    in):

    [OffFrzLayPk]*^C^C^P-LAYER S 0;;(setq layofrz (cdr (assoc 8 (entget (car
    (entsel "Select Item on Layer to FREEZE: ")))))) \-LAYER OF !layofrz F
    !layofrz;;^P

    Or, have you thought about just eliminating the layers instead, with Express
    Tools' LAYDEL command? That also works by picking an item on a layer you
    want to get rid of entirely.

    Kent Cooper, AIA

    ...
     
    Kent Cooper, AIA, Mar 4, 2004
    #8
  9. fontnhed

    chevy Guest

    This Lisp will freeze layers that are already off, May be it helps something

    ;;;;;;Re: layer off to freeze
    (defun C:Off2freeze (/ lyr layr code70)
    (while (setq lyr (tblnext "layer" (not lyr)))
    (if (minusp (cdr (assoc 62 lyr)))
    (progn
    (setq layr (entget (tblobjname "layer" (cdr (assoc 2 lyr))))
    code70 (logior (cdr (assoc 70 layr)) 1)
    layr (subst (cons 70 code70)(assoc 70 layr) layr)
    );;setq
    (entmod layr)
    );;progn
    );;if
    );;while
    (princ)
    )
     
    chevy, Mar 4, 2004
    #9
  10. fontnhed

    fontnhed Guest

    Great!!!

    Thanks guys!
     
    fontnhed, Mar 4, 2004
    #10
  11. fontnhed

    rdi Guest

    FH,

    I still don't get the purpose BOTH freeze and off. If you freeze a layer
    but leave it ON, it still doesn't display.

    Forgive me--I'm just a little curious.

    --

    RDI

    (remove the exclamation from the email address)

    I get don't need to be edited, just printed.
    depending on who did the drawing and they seem to have no sense of
    standardization. There are so many layers involved all the information is
    unreadable because text is stacked on text and objects multiple times. All I
    can really do is try to turn off enough layers until I get something that
    will be readable once printed.
    (That's why I need to freeze the layers I turn off)The drawings are a real
    pain in the backside. I'm just trying to find a way I can cut down on the
    time involved in dealing with them.
    i'm definitely listening.
     
    rdi, Mar 6, 2004
    #11
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.