Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: Layer Freeze by Pick

  1. #1
    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 Layer Freeze by Pick

    Hi all,

    I have civil 3d objects which have many layers within it and
    when I try to freeze one layer the hold object turns off.
    Is there lisp or something that I can use to freeze only
    the layer within object I pick...???

    Created a few profiles and wanted to freeze off
    by picking the grides but everything turns off.

    I hope some one can help...

    Here are the lisps I have use before but don't work now:
    Code:
    ;---------NF -------- FREEZE Nested Layer
    (defun C:NF (/ LAY)
            (prompt "\nFreeze NESTED layer by pick")
    	(SELLAY2)
    	(if (eq LAY (getvar "CLAYER"))
    		(prompt "\nCannot freeze current layer.")
        (progn
        (if (eq LAY "0")
            (prompt "\nCannot freeze layer < 0 >.  Use NFF.")
        (progn
    		(command "LAYER" "FREEZE" LAY "")
    		(prompt (strcat "\nLayer <" LAY "> is now FROZEN!"))
        )
        ) ) )
    	(princ)
    )
    ;-------------NFF ------------- NEsted Nested Freeze
    (defun c:nff ()
            (setq n2f1 NIL)
            (setq n2f2 NIL)
            (setq n2f1 (car (cadddr (nentsel "\nSelect Layer to Freeze :"))))
            (setq n2f2 (cdr (assoc 8 (entget n2f1))))
            (command "layer" "freeze" n2f2 "")
            (prompt (strcat "Layer <" n2f2 "> is now Frozen"))
    )
    Thanks

  2. #2
    I could stop if I wanted to
    Join Date
    2006-04
    Posts
    466
    Login to Give a bone
    0

    Default Re: Layer Freeze by Pick

    I think you need to load (SELLAY2)

  3. #3
    I could stop if I wanted to
    Join Date
    2006-04
    Posts
    466
    Login to Give a bone
    0

    Default Re: Layer Freeze by Pick

    If you can't find (SELLAY2), replace it with:

    (setq lay (cdr (assoc 8 (entget (car (nentsel))))))

  4. #4
    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 Freeze by Pick

    Quote Originally Posted by aaronic_abacus View Post
    I think you need to load (SELLAY2)
    (First)

    Thanks for your response and sorry but I quickly copied
    that part of the code without really reading what I was placeing.
    I do have a SELLAY2 and will post it Monday when I'm back at work...

    (Second)

    Do you know or heard of away to drill down to the layer you want by picking
    and not needed to open the Layer Manager...???

    Like always, I have users who like to pick, pick and pick
    and never once open a dialop if they can help it...

    This makes them faster but drive me crazy sometimes...

  5. #5
    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 Freeze by Pick

    Here you go:

    Code:
    ; --------  SELLAY ------- Get layer
    (defun SELLAY (/ EN)
    	(setvar "cmdecho" 0)
    	(while (not EN)
    		(setq EN (car
    			(entsel "\nSelect Layer (by picking entity): ")))
    		(if (not EN) (prompt "\nNo Entity selected--Try again!"))
    	)
    	(setq LAY (cdr (assoc 8 (entget EN))))
    )
    ; --------  SELLAY2 ------- Get Nested Layer
    (defun SELLAY2 (/ EN)
    	(setvar "cmdecho" 0)
    	(while (not EN)
    		(setq EN (car
                (nentsel "\nPick NESTED Entity: ")))
    		(if (not EN) (prompt "\nNo Entity selected--Try again!"))
    	)
    	(setq LAY (cdr (assoc 8 (entget EN))))
    )

  6. #6
    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 Freeze by Pick

    Does anyone have any ideas on how by picking freeze an civil Cd object... ???

    Anyone...???

  7. #7
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Layer Freeze by Pick

    Not having Civil, I can't tell. nentsel should be able to give you an ename for the nested object. From there you should be able to get hold of its edata with entget. Now if you freeze the layer contained in that, this could also freeze the full object if it's placed on the same layer (even if it has other nested objects on different layers).

    To test this, change the "freeze" to "off" instead.

    Just for my info, why don't you simply use the LAYFRZ command (or for that matter LAYOFF) both work with nested objects. If you don't have 2007 or higher, this forms part of Express Tools - othrewise it's part of base ACAD.

  8. #8
    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 Freeze by Pick

    Quote Originally Posted by irneb View Post
    Not having Civil, I can't tell. nentsel should be able to give you an ename for the nested object. From there you should be able to get hold of its edata with entget. Now if you freeze the layer contained in that, this could also freeze the full object if it's placed on the same layer (even if it has other nested objects on different layers).

    To test this, change the "freeze" to "off" instead.

    Just for my info, why don't you simply use the LAYFRZ command (or for that matter LAYOFF) both work with nested objects. If you don't have 2007 or higher, this forms part of Express Tools - othrewise it's part of base ACAD.

    Thanks irneb,

    And these work great but not with Civil 3D objects and here is why:

    The object I would like to freeze are on layer "C-ROAD-PROF-GRID-MINR"
    however civil 3D creates this object (Profile) with "C-ROAD-PROF-VIEW"
    as the parent layer and gride is the child layer...

    Layfrz will freeze the parent layer when you pick any layer (child) which is part of the parent so you end up freeze the every part of the object. You can go in the Layer Manager and freeze the child without freezing the parent so it can be done but I wanting to do it by picking and not by openning the Layer Manager...

    I welcome any and all answer and will try anything to understand how I can freeze by pick.
    Last edited by CadDog; 2008-10-10 at 05:48 PM.

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

    Default Re: Layer Freeze by Pick

    Have you tried changing some of the settings of the LayFrz / LayOff commands? You can change the Block selection settings from Block / Entity / None. Hopefully that will help.
    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

  10. #10
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Layer Freeze by Pick

    Most importantly change the block settings from Block to Entity - it usually changes to select the nested entity's layer. However, for some reason (I can't understand) some blocks work the other way round ... go figure.

Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 12
    Last Post: 2016-04-19, 06:09 PM
  2. Freeze Layer
    By Dave Lewis in forum Revit Architecture - General
    Replies: 3
    Last Post: 2011-02-15, 01:53 PM
  3. VP Freeze layer...
    By Dubweisertm in forum AutoLISP
    Replies: 3
    Last Post: 2010-05-02, 10:51 AM
  4. Tough Question - Layer Locking (Make Layer Visible But No Pick)
    By johnshar123xx in forum AutoCAD General
    Replies: 6
    Last Post: 2008-11-27, 06:36 AM

Posting Permissions

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